How to debug ROOT?

Dear ROOTers

How do I debug ROOT?

I cannot find any documentation on how to debug ROOT. There is no information in the Users_Guide.pdf. I have read INSTALL and BUILDSYSTEM, but did not find them helfulp.

At the moment I have compiled root_5.28/00 for Snow Leopard as follows:

./configure macosx64 --build=debug
. bin/

Then I have compiled my library “” and started a macro, but I did not get any debug information.

Thus I have set the file “system.rootrc” to “Root.Debug: 10”.
Now, when starting root I get the following error:

Info in <TROOT::InitSystem>: running with gDebug = 10
Info in <GetDict>: searches for HepMC::GenVertex
Info in <TMapTypeToClassRec::Print>: printing the typeinfo map in TClassTable
Key: 8TAttText
  class: TAttText 1
Key: 15TContextMenuImp

 *** Break *** segmentation violation

Do you know what the reason of this error is?
Where do I find the different debug levels for gDebug?

The reason that I need to debug ROOT is that the new production version has a severe problem with “tree-Write()”!
When I run my library “” from within ROOT then everything seeems to be ok. However, when I run “xps” from within “R” as my Bioconductor package “xps”, then it crashes R when I call “tree-Write()”. (The current version of my “xps” package runs fine with root_5.27/04, which is installed on all Bioconductor servers, and which the users of my package need to install, too.)

Best regards

Hi Christian,

You best bet in mac to debug, is simply to use gdb, for example you can do:[code]
gdb root.exe

run -b -l
root [0] .x something.C
… will print the backtrace …
[/code] or even gdb root.exe break main run -b -l root [0] gDebug = 3; root [1] .x something.



The crash you saw on MacOS when setting Root.Debug is fixed by revision 37702.


Dear Philippe,

Meanwhile I could start root in debug mode by setting the file “system.rootrc” to “Root.Debug: 1”.

However, my question remains:
Where do I find the different debug levels for gDebug?

Regarding your answer I am afraid that you have misunderstood my question. But it is probably
better to start a new topic for this problem: Problem with TTree::Write() with root_5.28/00

Best regards

[quote]Where do I find the different debug levels for gDebug?[/quote]There is no formal listing. The best bet is start increasing the value progressively. In your case 3 ought to be a good start.

[quote]Problem with TTree::Write() with root_5.28/00[/quote]I have no clue :slight_smile:. It works for all the test we have but you might have found a new issue, please investigate and/or send me the shortest possible running example showing the problem.


Dear Philippe,

I am afraid that once again it will not be possible to create a simple example, since
1, it has to be a package running within R
2, I have already created a short package running within R, but it did work fine

Could you please try at least to answer the two questions at:

Best regards