Thread overview
How to debug ?
May 24, 2014
Derix
May 24, 2014
bioinfornatics
May 24, 2014
Derix
May 25, 2014
Rene Zwanenburg
May 24, 2014
OK, I have the newest Eclipse+DDT on Linux.

Debugging capabilies look great :
https://github.com/bruno-medeiros/DDT/blob/latest/documentation/Features.md#debugging-functionality

However so far I haven't been able to step throug source code.
What am I missing ? Is there an option to pass to the compiler ?
Yet another tweak to json.dub ?
May 24, 2014
On Saturday, 24 May 2014 at 10:14:23 UTC, Derix wrote:
> OK, I have the newest Eclipse+DDT on Linux.
>
> Debugging capabilies look great :
> https://github.com/bruno-medeiros/DDT/blob/latest/documentation/Features.md#debugging-functionality
>
> However so far I haven't been able to step throug source code.
> What am I missing ? Is there an option to pass to the compiler ?
> Yet another tweak to json.dub ?

Hi,

To debug you nee to use -g flag to compiler
I use cgdb to debug D programm it wrap gdb and have a syntax
color for D. You need to take a recent cgdb version to get his D
support
May 24, 2014
> To debug you nee to use -g flag to compiler

Thanks, but how ?
May 25, 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.