How to debug ROOT - tools

Since the code is getting longer and longer, I am interested how I can do proper debugging.

What I have learnt so far is:

ROOT debug: … ight=debug



Compiling ROOT in debug mode worked wonders, since I was able to trace a segmentation fault to a specific line (function name + function line).

Valgrind is as far as I know recommend for the search of memory leaks:
proved useful while using CMSSW.

I followed the How To on gbd but every time I attached gdb to the ROOT process it froze.

However, I would like to debug my ROOT applications/analysis code properly:
Setting break points and viewing the values of the variables at them.
(and of course preferably do it in a GUI)

So my question is:
What are you using to debug your ROOT code?
Are there free (or commercial) tools out there which can make my life easier?

I am also interested if there is a possibility to include ROOT libraries/header files in your code and then compile it as a stand alone application with ROOT integrated (Discussion here), but it seems it is not the case.

For ‘normal’ C++ code there are plenty of tools out there.

BTW: I’m currently working with Eclipse, but would switch if there is something better.

It is likely that you do

gdb root instead of

gdb root.exe

It is likely that you do

gdb root instead of

gdb root.exe

My mistake. Attaching it to the root.exe process works. I was a bit confused since it is described for windows.
Now I just have to learn how to use it ROOT + (gdb + eclipse).

Qt-Creator can be quite a useful tool for interactive debugging.

By the way, with the CMake new build system, I guess one needs to specify
-DCMAKE_BUILD_TYPE="Debug" to get full debug info. See Building ROOT from source - ROOT