digitalmars.D.debugger - Visual D no bp's on x64
- Mike B Johnson (59/59) Jun 18 2017 in the last 20mins I did the following
- Rainer Schuetze (13/16) Jun 18 2017 As you expected, its not simple to reproduce. I have not managed to do s...
- Rainer Schuetze (8/30) Jun 18 2017 I could produce an issue when starting the mago debugger for the first
- Mike B Johnson (11/44) Jun 18 2017 Didn't work ;/
- Rainer Schuetze (8/20) Jun 18 2017 It seems the debug engine is only attached to the process when it starts...
- Mike B Johnson (5/27) Jun 19 2017 Doesn't work. Nothing is cut off. the x86 version is loading a
- Rainer Schuetze (7/37) Jul 11 2017 Did you have success debugging your x64 builds? I've committed a small
- Rainer Schuetze (6/28) Jul 22 2017 After installing VS2017 on a fresh Win10 install I could reproduce this
- Johnson Jones (3/24) Jul 31 2017 I installed a fresh VS2017 and the latest beta visual D and same
- Rainer Schuetze (3/30) Aug 03 2017 It hasn't been released until now:
- Johnson Jones (2/22) Aug 03 2017 Thanks! Seems to be working.
- FoxyBrown (19/45) Aug 05 2017 well, in x86 I still get a few BP's that won't be hit every once
- FoxyBrown (5/29) Aug 05 2017 Oops, it "works". The BP icon is no longer a hollow read disk but
- Rainer Schuetze (6/44) Aug 06 2017 It would be good if you could post the full function, even better a
in the last 20mins I did the following 1. Create a new DMD/LDC project 2. Added the code import std.stdio; import core.sys.windows.windows; import std.array, std.conv; int main(string[] argv) { wchar* pCmd = cast(wchar*)to!wstring(argv.join(" ")).ptr; STARTUPINFO si; //ZeroMemory( &si, sizeof(si) ); si.cb = si.sizeof; PROCESS_INFORMATION pi; //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; FormatMessage ( FORMAT_MESSAGE_FROM_SYSTEM, null, GetLastError(), cast(uint)MAKELANGID(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT), msg.ptr, cast(uint)2048, null ); writeln(msg[0..lstrlen(msg.ptr)]); return -1; } 3. Modified the command args in the options. Added cmd /c echo hello 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!
Jun 18 2017
On 18.06.2017 16:17, Mike B Johnson wrote: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!As you expected, its not simple to reproduce. I have not managed to do so. Could you specify a few more details: - Visual D version? - VS version? - Which Configuration selected? - dmd version? - ldc version (in case you switched to "LDC Debug")? - selected debug engine? Slightly unrelated, but one thing that often bothers me: if you open the project configuration dialog, VS doesn't always show the current configuration (but the last edited one), so you edit options that don't seem to have any effect.
Jun 18 2017
On 18.06.2017 16:50, Rainer Schuetze wrote:On 18.06.2017 16:17, Mike B Johnson wrote:I could produce an issue when starting the mago debugger for the first time after firing up VS2015: it showed an error, though, instead of not doing anything at all. Maybe it's a different effect of the same problem. I have added a work around that fixes it for me: https://ci.appveyor.com/project/rainers/visuald/build/job/5a92e21e7hxgty4b/artifacts BTW: the output window should show whether symbols for your application have been loaded. If not, you get the behavior that you reported.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!As you expected, its not simple to reproduce. I have not managed to do so. Could you specify a few more details: - Visual D version? - VS version? - Which Configuration selected? - dmd version? - ldc version (in case you switched to "LDC Debug")? - selected debug engine? Slightly unrelated, but one thing that often bothers me: if you open the project configuration dialog, VS doesn't always show the current configuration (but the last edited one), so you edit options that don't seem to have any effect.
Jun 18 2017
On Sunday, 18 June 2017 at 17:43:20 UTC, Rainer Schuetze wrote:On 18.06.2017 16:50, Rainer Schuetze wrote:Didn't work ;/ All I get on the output wndow is " C:\Windows\System32\dbghelp.dll unloaded. The thread 0x1ea4 has exited with code -1 (0xffffffff). The thread 0x1390 has exited with code -1 (0xffffffff). The thread 0x1ac has exited with code -1 (0xffffffff). The program '[492] Async.exe' has exited with code -1 (0xffffffff). "On 18.06.2017 16:17, Mike B Johnson wrote:I could produce an issue when starting the mago debugger for the first time after firing up VS2015: it showed an error, though, instead of not doing anything at all. Maybe it's a different effect of the same problem. I have added a work around that fixes it for me: https://ci.appveyor.com/project/rainers/visuald/build/job/5a92e21e7hxgty4b/artifacts BTW: the output window should show whether symbols for your application have been loaded. If not, you get the behavior that you reported.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!As you expected, its not simple to reproduce. I have not managed to do so. Could you specify a few more details: - Visual D version? - VS version? - Which Configuration selected? - dmd version? - ldc version (in case you switched to "LDC Debug")? - selected debug engine? Slightly unrelated, but one thing that often bothers me: if you open the project configuration dialog, VS doesn't always show the current configuration (but the last edited one), so you edit options that don't seem to have any effect.
Jun 18 2017
On 18.06.2017 20:25, Mike B Johnson wrote:Didn't work ;/ All I get on the output wndow is " C:\Windows\System32\dbghelp.dll unloaded. The thread 0x1ea4 has exited with code -1 (0xffffffff). The thread 0x1390 has exited with code -1 (0xffffffff). The thread 0x1ac has exited with code -1 (0xffffffff). The program '[492] Async.exe' has exited with code -1 (0xffffffff). "It seems the debug engine is only attached to the process when it starts terminating. Nothing cut off at the top? Strange. Please try switching to the Visual Studio debug engine on the project debugger configuration page. This still uses mago as the D expression evaluator, but has all the other features of the VS debugger. It's actually the new and preferred way to run the debugger since the last Visual D release, especially with mixed languages.
Jun 18 2017
On Sunday, 18 June 2017 at 21:02:12 UTC, Rainer Schuetze wrote:On 18.06.2017 20:25, Mike B Johnson wrote:Doesn't work. Nothing is cut off. the x86 version is loading a bunch of symbols so maybe it is just a path issue? Is so then it should print a proper error message for it. I'll try to play around with the paths and see.Didn't work ;/ All I get on the output wndow is " C:\Windows\System32\dbghelp.dll unloaded. The thread 0x1ea4 has exited with code -1 (0xffffffff). The thread 0x1390 has exited with code -1 (0xffffffff). The thread 0x1ac has exited with code -1 (0xffffffff). The program '[492] Async.exe' has exited with code -1 (0xffffffff). "It seems the debug engine is only attached to the process when it starts terminating. Nothing cut off at the top? Strange. Please try switching to the Visual Studio debug engine on the project debugger configuration page. This still uses mago as the D expression evaluator, but has all the other features of the VS debugger. It's actually the new and preferred way to run the debugger since the last Visual D release, especially with mixed languages.
Jun 19 2017
On 20.06.2017 02:05, Mike B Johnson wrote:On Sunday, 18 June 2017 at 21:02:12 UTC, Rainer Schuetze wrote:Did you have success debugging your x64 builds? I've committed a small change to the mago debugger, maybe it helps. There is a new installer here: https://github.com/dlang/visuald/releases/tag/v0.45.0-rc1 If that still fails: Does debugging a C++ application work? If it does, you could try exchanging the debug executable in the C++ project with the D executable and see if that can be debugged.On 18.06.2017 20:25, Mike B Johnson wrote:Doesn't work. Nothing is cut off. the x86 version is loading a bunch of symbols so maybe it is just a path issue? Is so then it should print a proper error message for it. I'll try to play around with the paths and see.Didn't work ;/ All I get on the output wndow is " C:\Windows\System32\dbghelp.dll unloaded. The thread 0x1ea4 has exited with code -1 (0xffffffff). The thread 0x1390 has exited with code -1 (0xffffffff). The thread 0x1ac has exited with code -1 (0xffffffff). The program '[492] Async.exe' has exited with code -1 (0xffffffff). "It seems the debug engine is only attached to the process when it starts terminating. Nothing cut off at the top? Strange. Please try switching to the Visual Studio debug engine on the project debugger configuration page. This still uses mago as the D expression evaluator, but has all the other features of the VS debugger. It's actually the new and preferred way to run the debugger since the last Visual D release, especially with mixed languages.
Jul 11 2017
On 18.06.2017 20:25, Mike B Johnson wrote:After installing VS2017 on a fresh Win10 install I could reproduce this issue: the mago debug engine failed to load the symbols when only VS2017 is installed, because the COM-CLSID to load msdia140.dll changed. Switching to the VS debug engine worked, though. Should be fixed in the next release.I could produce an issue when starting the mago debugger for the first time after firing up VS2015: it showed an error, though, instead of not doing anything at all. Maybe it's a different effect of the same problem. I have added a work around that fixes it for me: https://ci.appveyor.com/project/rainers/visuald/build/job/5a92e2 e7hxgty4b/artifacts BTW: the output window should show whether symbols for your application have been loaded. If not, you get the behavior that you reported.Didn't work ;/ All I get on the output wndow is " C:\Windows\System32\dbghelp.dll unloaded. The thread 0x1ea4 has exited with code -1 (0xffffffff). The thread 0x1390 has exited with code -1 (0xffffffff). The thread 0x1ac has exited with code -1 (0xffffffff). The program '[492] Async.exe' has exited with code -1 (0xffffffff). "
Jul 22 2017
On Saturday, 22 July 2017 at 12:54:17 UTC, Rainer Schuetze wrote:On 18.06.2017 20:25, Mike B Johnson wrote:I installed a fresh VS2017 and the latest beta visual D and same issues. As of today, was this suppose to be fixed?After installing VS2017 on a fresh Win10 install I could reproduce this issue: the mago debug engine failed to load the symbols when only VS2017 is installed, because the COM-CLSID to load msdia140.dll changed. Switching to the VS debug engine worked, though. Should be fixed in the next release.[...]Didn't work ;/ All I get on the output wndow is " C:\Windows\System32\dbghelp.dll unloaded. The thread 0x1ea4 has exited with code -1 (0xffffffff). The thread 0x1390 has exited with code -1 (0xffffffff). The thread 0x1ac has exited with code -1 (0xffffffff). The program '[492] Async.exe' has exited with code -1 (0xffffffff). "
Jul 31 2017
On 31.07.2017 19:51, Johnson Jones wrote:On Saturday, 22 July 2017 at 12:54:17 UTC, Rainer Schuetze wrote:It hasn't been released until now: https://github.com/dlang/visuald/releases/tag/v0.45.0On 18.06.2017 20:25, Mike B Johnson wrote:I installed a fresh VS2017 and the latest beta visual D and same issues. As of today, was this suppose to be fixed?After installing VS2017 on a fresh Win10 install I could reproduce this issue: the mago debug engine failed to load the symbols when only VS2017 is installed, because the COM-CLSID to load msdia140.dll changed. Switching to the VS debug engine worked, though. Should be fixed in the next release.[...]Didn't work ;/ All I get on the output wndow is " C:\Windows\System32\dbghelp.dll unloaded. The thread 0x1ea4 has exited with code -1 (0xffffffff). The thread 0x1390 has exited with code -1 (0xffffffff). The thread 0x1ac has exited with code -1 (0xffffffff). The program '[492] Async.exe' has exited with code -1 (0xffffffff). "
Aug 03 2017
On Thursday, 3 August 2017 at 07:06:06 UTC, Rainer Schuetze wrote:On 31.07.2017 19:51, Johnson Jones wrote:Thanks! Seems to be working.On Saturday, 22 July 2017 at 12:54:17 UTC, Rainer Schuetze wrote:It hasn't been released until now: https://github.com/dlang/visuald/releases/tag/v0.45.0On 18.06.2017 20:25, Mike B Johnson wrote:I installed a fresh VS2017 and the latest beta visual D and same issues. As of today, was this suppose to be fixed?[...]After installing VS2017 on a fresh Win10 install I could reproduce this issue: the mago debug engine failed to load the symbols when only VS2017 is installed, because the COM-CLSID to load msdia140.dll changed. Switching to the VS debug engine worked, though. Should be fixed in the next release.
Aug 03 2017
On Thursday, 3 August 2017 at 20:22:56 UTC, Johnson Jones wrote:On Thursday, 3 August 2017 at 07:06:06 UTC, Rainer Schuetze wrote:well, in x86 I still get a few BP's that won't be hit every once in a while(well, happened for the first time since I've used the new release). The code looks like while(i < data.length && data[i] != '>' && data[i] != '"' && data[i..i+token2.length] != token2) i++; if (data[i] == '>') { continue; } I put a BP on the if and when ran it says it won't be hit. I have a BP right above it and below it and it works fine. says "The BP will not currently be hit. No symbols have been loaded for this document.". I do not know why symbols really matter for BP's? If I change the if statement to if (data[i] == '>') { continue; } it works ;/On 31.07.2017 19:51, Johnson Jones wrote:Thanks! Seems to be working.On Saturday, 22 July 2017 at 12:54:17 UTC, Rainer Schuetze wrote:It hasn't been released until now: https://github.com/dlang/visuald/releases/tag/v0.45.0On 18.06.2017 20:25, Mike B Johnson wrote:I installed a fresh VS2017 and the latest beta visual D and same issues. As of today, was this suppose to be fixed?[...]After installing VS2017 on a fresh Win10 install I could reproduce this issue: the mago debug engine failed to load the symbols when only VS2017 is installed, because the COM-CLSID to load msdia140.dll changed. Switching to the VS debug engine worked, though. Should be fixed in the next release.
Aug 05 2017
On Sunday, 6 August 2017 at 03:12:22 UTC, FoxyBrown wrote:On Thursday, 3 August 2017 at 20:22:56 UTC, Johnson Jones wrote:Oops, it "works". The BP icon is no longer a hollow read disk but it is simply not hit ;/ I know all this doesn't help much but it all seems to be related to the previous bugs.On Thursday, 3 August 2017 at 07:06:06 UTC, Rainer Schuetze wrote:well, in x86 I still get a few BP's that won't be hit every once in a while(well, happened for the first time since I've used the new release). The code looks like while(i < data.length && data[i] != '>' && data[i] != '"' && data[i..i+token2.length] != token2) i++; if (data[i] == '>') { continue; } I put a BP on the if and when ran it says it won't be hit. I have a BP right above it and below it and it works fine. says "The BP will not currently be hit. No symbols have been loaded for this document.". I do not know why symbols really matter for BP's? If I change the if statement to if (data[i] == '>') { continue; } it works ;/[...]Thanks! Seems to be working.
Aug 05 2017
On 06.08.2017 05:21, FoxyBrown wrote:On Sunday, 6 August 2017 at 03:12:22 UTC, FoxyBrown wrote:It would be good if you could post the full function, even better a complete compilable file exposing the problem. I suspect dmd just doesn't produce proper debug information. For example "continue" is often optimized away due to some branches even removed in debug code.On Thursday, 3 August 2017 at 20:22:56 UTC, Johnson Jones wrote:Oops, it "works". The BP icon is no longer a hollow read disk but it is simply not hit ;/ I know all this doesn't help much but it all seems to be related to the previous bugs.On Thursday, 3 August 2017 at 07:06:06 UTC, Rainer Schuetze wrote:well, in x86 I still get a few BP's that won't be hit every once in a while(well, happened for the first time since I've used the new release). The code looks like while(i < data.length && data[i] != '>' && data[i] != '"' && data[i..i+token2.length] != token2) i++; if (data[i] == '>') { continue; } I put a BP on the if and when ran it says it won't be hit. I have a BP right above it and below it and it works fine. says "The BP will not currently be hit. No symbols have been loaded for this document.". I do not know why symbols really matter for BP's? If I change the if statement to if (data[i] == '>') { continue; } it works ;/[...]Thanks! Seems to be working.
Aug 06 2017