Visual D no bp's on x64

Mike B Johnson via Digitalmars-d-debugger digitalmars-d-debugger at
Sun Jun 18 07:17:44 PDT 2017

in the last 20mins I did the following

1. Create a new DMD/LDC project

2. Added the code

import std.stdio;
import std.array, std.conv;

int main(string[] argv)

	wchar* pCmd = cast(wchar*)to!wstring(argv.join(" ")).ptr;

     //ZeroMemory( &si, sizeof(si) );
     si.cb = si.sizeof;
     //ZeroMemory(&pi, sizeof(pi));

     // Start the child process.
     BOOL result = CreateProcess
         NULL, // No module name (use command line)
         pCmd, // Command line
         NULL, // Process handle not inheritable
         NULL, // Thread handle not inheritable
         FALSE, // Set bInheritHandles to FALSE
         DETACHED_PROCESS, // Detach process
         NULL, // Use parent's environment block
         NULL, // Use parent's starting directory
         &si, // Pointer to STARTUPINFO structure
         &pi // Pointer to PROCESS_INFORMATION structure (returned)
     if (result) return 0;

     wchar[2048] msg;
         msg.ptr, cast(uint)2048,

     return -1;

3. Modified the command args in the options. Added cmd /c echo 

4. Then went to debug it by putting a bp on the first line so I 
could check and ran it. Guess what? The program opened and 
closed. I've ran in to this problem before.

5. I added a bunch of bp's thinking it was just a problem with 
the first one(as that is how I get around it before).

6. Ran the program. Same thing. Ran the program. Same thing. I 
noticed that the bp's were turning white the split second the 
program was active.

hmmm... I then noticed the program was being built for x64.

7. I then changed it to x86 and voilĂ !

So, there is some issue with x64 and visual d's debugging in 
visual studio. That is the only file in the project. If it works 
on your system, keep trying until it doesn't!

More information about the Digitalmars-d-debugger mailing list