How to debug ?

Rene Zwanenburg via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun May 25 02:18:12 PDT 2014


On Saturday, 24 May 2014 at 15:48:11 UTC, Derix wrote:
>> To debug you nee to use -g flag to compiler
>
> Thanks, but how ?

I don't use Eclipse, but for debugging you usually have to do two 
things. As mentioned before you need to have debug information in 
the executable. Dub will generate debug executables by default.

Then the debugger needs to be attached to your process. Most 
IDE's have a Run command and a Debug command. Only the latter 
will automatically attach the debugger to your process.

If this doesn't work there's usually also an Attach to Process 
option which allows you to manually attach the debugger to an 
already running process. This is less than ideal but can 
sometimes be useful.


More information about the Digitalmars-d-learn mailing list