Electrolysis/Debugging: Difference between revisions

no edit summary
(Created page with '== Windows == ('''TODO''') Apparently Windows has a magic debugger that works great with multiple processes. == Linux == To debug only the parent process with emacs gud-gdb, j…')
 
No edit summary
Line 24: Line 24:
To debug both the parent and children, make sure MOZ_DEBUG_CHILD_PROCESS is set in the environment you'll launch the parent from, and launch the parent process in gud-gdb as above.  Unfortunately, as far as the author knows gud-gdb can't handle multiple gdb sessions ('''TODO: is that true?''').  So to debug child processes, you'll need to pull up a new shell for each and attach to them with good old "gdb attach PID".
To debug both the parent and children, make sure MOZ_DEBUG_CHILD_PROCESS is set in the environment you'll launch the parent from, and launch the parent process in gud-gdb as above.  Unfortunately, as far as the author knows gud-gdb can't handle multiple gdb sessions ('''TODO: is that true?''').  So to debug child processes, you'll need to pull up a new shell for each and attach to them with good old "gdb attach PID".


The [http://code.google.com/p/chromium/wiki/LinuxDebugging#GDB Google Chromium debugging guide for Linux] has some useful tips that also apply to our codebase, but we don't support all the tricks they show yet.
Don't forget to check out the [https://developer.mozilla.org/en/Debugging_Mozilla_with_gdb main Mozilla gdb guide].
 
Also the [http://code.google.com/p/chromium/wiki/LinuxDebugging#GDB Google Chromium debugging guide for Linux] has some tips that also apply to our codebase, but we don't support all the tricks they show yet.


'''TODO''' other debuggers?
'''TODO''' other debuggers?
Confirmed users
699

edits