Can't start to debug an app in any IDE

WebFreak001 d.forum at webfreak.org
Sat Sep 21 10:47:23 UTC 2019


On Saturday, 21 September 2019 at 06:49:13 UTC, Wusiki Jeronii 
wrote:
> Hello. I can't start the debugging process. I've tried VS code, 
> VS studio 2010, VS studio 2015, VS Studio 2019, IntelliJ IDEA 
> and dlang IDE.  I've tried different OSs (Windows and Linux) 
> and different machines. For now, I prefer windows. Also, I've 
> tried different compilers: DMD and ldc2.
> In VS code I've tried native Debug by WebFreak and cpptools. 
> Using by native Debug I've tried gdb and mago-mi compiler. 
> Using Mago-mi I get the error: "Could not start debugger 
> process, does the program exist in filesystem?
> Error: spawn mago-mi ENOENT"
> Mago-mi exists in my PATH.
> Using gdb in VS code I get the error: DBG: Breakpoint binding 
> error: No symbols have been loaded for this document. Then I 
> also see: "warning: Can not parse XML library list; XML support 
> was disabled at compile time".
> Using cpptools in VS code I don't get nonstandard error. My app 
> just runs in simple mode (without pause of the program when it 
> needs).
> In VS studio 2010 I can't even run my app without debugging 
> tools. When I try to build project I get error "cannot monitor 
> 32-bit exetuable dmd (or ldc2 if I use ldc2 compiler), no 
> suitable tracker.exe found". Visual D, NetFixTools 4, DMD, and 
> ldc2 exist in my PATH.
> In VS studio 2015 I also can't build the project. I get the 
> error: "core.exception.RangeError at ..\tools\pipedmd.d(577): 
> Range violation"
> In VS studio 2019 I can't create a project at all. Looks like 
> it is IDE issue.
> In IntelliJ IDEA I could run my app before . But if I try to 
> debug the program, the program just stopped without any error 
> in the debugger log. If I use gdb. If I use mago-mi I get the 
> error "Caused by: java.lang.IllegalArgumentException: Argument 
> for @NotNull parameter 'module' of 
> com/intellij/openapi/roots/ModuleRootManager.getInstance must 
> not be null" and the program can't run at all (Fatal error).
> In dlang IDE I get the error: " Breakpoint binding error: No 
> symbols have been loaded for this document."
> Can you help me with this? What do I do wrong?

How did you compile your programs? Using dub there should be no 
problem because it defaults to emitting debug symbols.

If you manually invoke LDC/DMD you have to pass the -g flag to 
output debug symbols.

In dub you can additionally add "lflags": 
["/PDB:my_program_name.pdb"] to your dub.json to make it emit a 
.pdb file which in my experience improved debug experience when 
it before didn't work. It might be generated in the .dub folder 
and you can copy it if it still doesn't work


More information about the Digitalmars-d-ide mailing list