File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,26 @@ import pdb; pdb.set_trace()
155
155
anywhere in the test. You will then be able to inspect variables, as well as
156
156
call methods that interact with the bitcoind nodes-under-test.
157
157
158
+ If further introspection of the bitcoind instances themselves becomes
159
+ necessary, this can be accomplished by first setting a pdb breakpoint
160
+ at an appropriate location, running the test to that point, then using
161
+ ` gdb ` to attach to the process and debug.
162
+
163
+ For instance, to attach to ` self.node[1] ` during a run:
164
+
165
+ ``` bash
166
+ 2017-06-27 14:13:56.686000 TestFramework (INFO): Initializing test directory /tmp/user/1000/testo9vsdjo3
167
+ ```
168
+
169
+ use the directory path to get the pid from the pid file:
170
+
171
+ ``` bash
172
+ cat /tmp/user/1000/testo9vsdjo3/node1/regtest/bitcoind.pid
173
+ gdb /home/example/bitcoind < pid>
174
+ ```
175
+
176
+ Note: gdb attach step may require ` sudo `
177
+
158
178
### Util tests
159
179
160
180
Util tests can be run locally by running ` test/util/bitcoin-util-test.py ` .
You can’t perform that action at this time.
0 commit comments