Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Geremia on January 26, 2016, 12:15:30 AM



Title: Online Bitcoin Script simulator or debugger?
Post by: Geremia on January 26, 2016, 12:15:30 AM
Is there an online simulator that would allow me to step through, debug, or simulate the execution of a Bitcoin script?


Title: Re: Online Bitcoin Script simulator or debugger?
Post by: achow101 on January 26, 2016, 12:23:54 AM
Is there an online simulator that would allow me to step through, debug, or simulate the execution of a Bitcoin script?
Try this one: https://webbtc.com/script/

If you want a program that is also good for this, checkout hashmal: https://bitcointalk.org/index.php?topic=1168604


Title: http://www.cs.princeton.edu/~tongbinw/bitcoinIDE/build/editor.html
Post by: Geremia on January 26, 2016, 05:45:58 PM
I also discovered this

http://www.cs.princeton.edu/~tongbinw/bitcoinIDE/build/editor.html

courtesy StephenM347 on Bitcoin StackExchange (https://bitcoin.stackexchange.com/a/42598/4334).


Title: Re: Online Bitcoin Script simulator or debugger?
Post by: CIYAM on January 26, 2016, 05:49:29 PM
Most of the online ones that I have played with have bugs (including those linked) so don't rely on them for anything very important.

Best to play with Bitcoin using "-regtest" for prototyping of actual scripts (the debug.log can help with working out why scripts have failed).


Title: Re: Online Bitcoin Script simulator or debugger?
Post by: Geremia on January 27, 2016, 09:17:30 PM
Best to play with Bitcoin using "-regtest" for prototyping of actual scripts (the debug.log can help with working out why scripts have failed).
How do I use that? Where is it documented? thanks


Title: Re: Online Bitcoin Script simulator or debugger?
Post by: achow101 on January 27, 2016, 09:19:45 PM
Best to play with Bitcoin using "-regtest" for prototyping of actual scripts (the debug.log can help with working out why scripts have failed).
How do I use that? Where is it documented? thanks
Start Bitcoin Core with the -regtest flag in the command that starts it. Mine some regtest coins and then create your transaction by hand. Push it through your Bitcoin Core and see if it transacts or not.