Facilitates debugging bitcoind in the context of Python tests, inside of an editor/IDE.
Makes bitcoind spin during startup, waiting for a debugger to be attached.
Example usage
- Set breakpoints in editor/IDE.
- Start Python test:
0₿ build/test/functional/feature_config_args.py --debugnode 0
12025-01-23T13:51:09.143000Z TestFramework (INFO): PRNG seed is: 1495347861660308752
22025-01-23T13:51:09.143000Z TestFramework (INFO): Initializing test directory /tmp/bitcoin_func_test_hx8vd5bv
32025-01-23T13:51:09.144000Z TestFramework.node0 (INFO): bitcoind started, waiting for debugger, PID: 1382744
- Navigate in editor/IDE and attach to process 1382744, which will now continue executing under the context of the test.
- Experience how debugger hits breakpoints.
Reasons for draft status
- Untested on Mac & Windows.
- Find a better way to enable
WAIT_FOR_DEBUGGER
in CMake that doesn’t leak into the interface since it’s not needed?