set print pretty
set height 0
set print elements unlimited
set history save on
set history save on
appends your typed commands into .gdb_history
on exit, set logging on
appends gdb output into gdb.txt
as you go.
Enable runtime debug checking (-O0 when PR 4754 merges)
make clean
CONFIGURE_FLAGS=--enable-debug zcutil/build.sh -j8
Until 4754 merges, manually edit src/Makefile
, change O1
, O2
, O3
to O0
.
If you're interested in a particular source file, touch src/init.cpp; make
.
Add calls to LogPrintf("@@@ ...\n");
or std::cout << "@@@ " << variable << '\n';
Quite a few classes have a ToString()
method, look for examples like uint256
for hashes
python functional tests (qa/rpc-tests):
import pdb; pdb.set_trace() # to set a debugger breakpoint in functional (python) test
import pprint; pp = pprint.PrettyPrinter(indent=4); pp.pprint(var) # dictionaries