Skip to content

Commit

Permalink
hacking: document subdaemon debugging
Browse files Browse the repository at this point in the history
Signed-off-by: William Casarin <[email protected]>
  • Loading branch information
jb55 authored and rustyrussell committed Jan 15, 2018
1 parent 4a12caf commit 3e3dbfd
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,18 @@ Here's a list of parts, with notes:

* onchaind/ - daemon to hand a single channel which has had its funding transaction spent.

Debugging
---------

You can debug crashing subdaemons with the argument
`--dev-debugger=lightning_channeld`, where `channeld` is the subdaemon name. It
will print out a command such as:

gdb -ex 'attach 22398' lightning_channeld -ex return

Run this command to start debugging. You may need to type `return` one more time
to exit the infinite while loop, otherwise you can type `continue` to begin.

Testing
-------

Expand Down

0 comments on commit 3e3dbfd

Please sign in to comment.