On Saturday, 14 October 2017 at 19:01:52 UTC, piotrklos wrote:
On Saturday, 14 October 2017 at 13:12:51 UTC, Jerry wrote:
On Friday, 13 October 2017 at 12:55:09 UTC, piotrklos wrote:
(...)

If you use generate a 32-bit binary using DMD, it generates it in a format that the C/C++ extension doesn't understand. You need to compile -m32mscoff or -m64, and you need to make sure the /DEBUG is passed to the linker, as I don't think dmd passes it that. You can do that by passing "-L/DEBUG" to DMD (when using -m32mscoff or -m64). There should be a .pdb file that gets generated, when you start the debugger it should say that symbols were loaded for the exe.

I also can't say for certain if debug information is even generated for the unittests, so that might be something worth looking into to make sure it does.

I have added this to dub.json:
                        "dmd-flags":[
                                "-g", "-m64", "-L/DEBUG"
                        ]
but I don't see a pdb file generated when I build. What am I doing wrong?

Are you sure it's not dflags? I don't use dub but a quick search shows there's dflags, but no flags setting.

https://code.dlang.org/package-format?lang=json

Also using verbose flag with dub should show you the commands that are executed for building.

Reply via email to