user84876: I would like to use Bitcoin core's wallet UI to create a transaction but instead of broadcasting it I would like to get the underlying raw transaction.
Is there a way to do that? 
I assume that network sniffing tools might be able to help but I wonder if there is a direct way. I think it would be really useful to have such feature - view raw transaction & confirm before broadcast.
The motivation for this specific scenario is the following  - I would like to create a raw transaction on an offline machine running Bitcoin core (with synced blockhain) and broadcast the transaction from another machine.
I am aware that what I am asking for is easily achievable with the CLI but I'd like to use the convenience of a GUI (& fee calculations) and also avoid creating non-intended transactions.

user38618: 1) First you can add connect=1.1.1.1 to your bitcoin.conf. Your node won't search for other nodes and just try to connect to 1.1.1.1. Since 1.1.1.1 is not a node, your node will have 0 peers.
2) Then you can make the transaction, open the debug console and enter: gettransaction YOURTXID. (or getrawtransaction to get the hex encoded transaction)
3) Then you can close Core, add zapwallettxes=1 to bitcoin.conf and start Core to remove unconfirmed wallet transaction you've made to cancel it.

84876: <p>I would like to use Bitcoin core's wallet UI to create a transaction but instead of broadcasting it I would like to get the underlying raw transaction.</p>

<p>Is there a way to do that? </p>

<p>I assume that network sniffing tools might be able to help but I wonder if there is a direct way. I think it would be really useful to have such feature - view raw transaction &amp; confirm before broadcast.</p>

<p>The motivation for this specific scenario is the following  - I would like to create a raw transaction on an offline machine running Bitcoin core (with synced blockhain) and broadcast the transaction from another machine.</p>

<p>I am aware that what I am asking for is easily achievable with the CLI but I'd like to use the convenience of a GUI (&amp; fee calculations) and also avoid creating non-intended transactions.</p>
 38618: <p>1) First you can add <code>connect=1.1.1.1</code> to your <code>bitcoin.conf</code>. Your node won't search for other nodes and just try to connect to 1.1.1.1. Since 1.1.1.1 is not a node, your node will have 0 peers.</p>

<p>2) Then you can make the transaction, open the debug console and enter: <code>gettransaction YOURTXID</code>. (or <code>getrawtransaction</code> to get the hex encoded transaction)</p>

<p>3) Then you can close Core, add <a href="https://bitcoin.stackexchange.com/q/45988"><code>zapwallettxes=1</code></a> to <code>bitcoin.conf</code> and start Core to remove unconfirmed wallet transaction you've made to cancel it.</p>
