This project provides nChain with a gdb style debugger for bitcoin script.
dbg- Bitcoin Script debugger, this provides a GDB style interface to run, step through and set breakpoints in Metascript and canonical script programs.
These tools are built around a BSV bitcoin script engine written in Rust.
The project tools can be run from Docker or Python on the commandline as long as the associated dependencies are met. To debugger includes a script parser that is written using a combination of Rust (Pest crate) for Parser Expression Grammer and python. To build please follow the steps below. Pleae note Rust and Maturin must be installed. And you must have a python virtual environment such as penv set up correctly.
maturin build
pip3 install --force-reinstall "$(find target/wheels -name '*.whl' | head -n 1)"python3 python/src/dbg.py -file ./examples/large_data_push_integer_test.bsThe debugger in this project can be run in a Docker instance. The build the container:
./build.shTo run the debugger in the docker container.
./run_dbg.sh ./examples/large_integer_test.bsPlease note that Bitcoin Script files must have a '.bs' file extension.