evilrat666 at gmail.com
Thu Feb 7 02:55:15 UTC 2019
On Wednesday, 6 February 2019 at 23:59:07 UTC, Charles wrote:
> I don't use C++, and I do use Windows, which has me wondering
> if I'm just missing some normal/exepcted configuration.
> My most recent attempt I tried to get Native Debug to make VS
> Code debugging stop on the first line. Instead, it just runs
> the program, and exits.
"Native Debug" is for GDB and looks like it doesn't even works on
Windows. But even on Linux I found that C++ tools are much nicer.
You need C++ tools from Microsoft to debug D code, don't mind the
name, its debugger works for any (compatible formats) native code.
Then add C++ Windows debug configuration and set your paths.
Done. You can debug now. (Though it is possible that it will
require Visual Studio Build Tools installation)
Of course this will not work for default DMD builds because it is
using ancient object files format that is not compatible with VS
debugger engine, so using DMD you need to build with -m32mscoff
(dub --arch=x86_mscoff) or -m64 (dub --arch=x86_64) flags.
More information about the Digitalmars-d-learn