added options

This commit is contained in:
Shannon Appelcline 2020-07-15 12:45:40 -10:00 committed by GitHub
parent 52bfcd3c5b
commit 1c752c7926
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -166,6 +166,24 @@ script | stack
``` ```
We'll be returning to `btcdeb` from time to time, and it will remain an excellent tool for testing your own scripts. We'll be returning to `btcdeb` from time to time, and it will remain an excellent tool for testing your own scripts.
### Use the Power of btcdeb
`btcdeb` also has a few more powerful functions, such as `print` and `stack`, which show you the script and the stack at any time.
For example, in the above script, once you've advanced to the `OP_ADD` command, you can see the following:
```
btcdeb> print
#0000 3
#0001 2
-> #0002 OP_ADD
#0003 4
#0004 OP_SUB
btcdeb> stack
<01> 02 (top)
<02> 03
```
Using these commands can make it easier to see what's going on and where you are.
## Test a Script Online ## Test a Script Online
There are also a few web simulators that you can use to test scripts online. They can be superior to a command-line tool by offering a more graphical output, but we also find that they tend to have shortcomings. There are also a few web simulators that you can use to test scripts online. They can be superior to a command-line tool by offering a more graphical output, but we also find that they tend to have shortcomings.