On Thursday, 8 February 2018 at 21:09:33 UTC, JN wrote:
Hi,

is there any way to debug binaries on Windows? I'd at least like to know which line of code made it crash. If it's D code, I get a call trace usually, but if it's a call to a C library, I get a crash and that's it. I am using VSCode and I'd prefer to debug in it if possible, but using other IDEs is a possibility for me if that will help.

Other options:

I use x64dbg, x32dbg and ollydbg with D.
When PDB files are loaded you should get symbol names and line-by-line source file mapping. Currently they don't do much memory analysis though — like getting names of variables on the stack or fields of objects on the heap.

With -m64 the linker should already be emitting PDB files that x64dbg will find automatically.

With 32-bit OPTLINKed code you need to use cv2pdb on the .exe/.dll to get the PDB file, then olly/x32dbg should find it.

WinDBG should work too — which is probably your only choice if you're writing a driver.

Reply via email to