Personal tools
You are here: Home / cmgui / Wiki / Tips for using ddd
Log in

Forgot your password?

Tips for using ddd

If wanting to debug a firefox extension you can easily start up ddd with firefox by typing 'firefox -g' at a console prompt. This will open ddd with firefox as the application to run.

Type 'run' to begin exectution of the firefox application. You will probably need to start using an extension before you can set a breakpoint within it.

When setting break points for C++ function calls that have double colons, or spaces in their name, single quotes must be placed around the function header. Note the full function header is required, including arguments types. Eg you would type:

break 'CmguiComputedField::SetTypeSumComponents(CmguiIComputedField*, double*, unnsigned int)'

When typing the name of a function to set as a breakpoint you can used tab to show the list of possible completions. If there is only one possiblity tab will auto complete your function for you.

If firefox crashes when you are debugging it you can often get useful information by looking at the backtrace (type bt to see the backtract or use the menu). Unfortunately some times ddd will note be able to give a meaningful back trace because things run asynchronously and the code that caused the problem may not be the latest code to run. You can often get around this by running firefox in sync mode. To start firefox in sync mode with the debugger type:

firefox --sync -g