Thread overview
Visual D can't debug programs
Nov 30, 2019
SkyCloud
Dec 01, 2019
Rainer Schuetze
Dec 01, 2019
SkyCloud
Dec 01, 2019
Rainer Schuetze
Dec 01, 2019
SkyCloud
November 30, 2019
I'm a novice in D and VisualD. Just installed VisualD 0.51.0-beta1 (a version with DMD/LDC compiler: VisualD-v0.51.0-beta1-dmd-2.089.0-ldc2-1.18.0.exe
) to Visual Studio 2019 16.3.9. It compiles and runs programs normally, but when I try to debug with F5 key, make a breakpoint, the program just starts and executes as there's no debugging mode (like as I pressed Ctrl+F5). So I can't view variables' values and so on. In C++ projects the debugger works normally, so the problem is only with VisualD.

In fact this case is the same to:
https://forum.dlang.org/thread/htjjwfynugdshluamgrm@forum.dlang.org
But there was Visual Studio Code, not Visual Studio.

Is it just because my Visual Studio is 16.3, but not 16.2, which the current version of VisualD was aimed to? So should I just wait untill the newer version of VisualD will support Visual Studio 16.3?

As I'm a novice to D/VisualD, I do not know what to do. Please, help.
December 01, 2019

On 30/11/2019 19:29, SkyCloud wrote:
> I'm a novice in D and VisualD. Just installed VisualD 0.51.0-beta1 (a
> version with DMD/LDC compiler:
> VisualD-v0.51.0-beta1-dmd-2.089.0-ldc2-1.18.0.exe
> ) to Visual Studio 2019 16.3.9. It compiles and runs programs normally,
> but when I try to debug with F5 key, make a breakpoint, the program just
> starts and executes as there's no debugging mode (like as I pressed
> Ctrl+F5). So I can't view variables' values and so on. In C++ projects
> the debugger works normally, so the problem is only with VisualD.
> 
> In fact this case is the same to: https://forum.dlang.org/thread/htjjwfynugdshluamgrm@forum.dlang.org But there was Visual Studio Code, not Visual Studio.
> 
> Is it just because my Visual Studio is 16.3, but not 16.2, which the current version of VisualD was aimed to? So should I just wait untill the newer version of VisualD will support Visual Studio 16.3?
> 
> As I'm a novice to D/VisualD, I do not know what to do. Please, help.

It works here, using VS 2019 16.3.10.

What project type and platform are you using? If you use the "Visual D Win32 Application" project template, the preferred selection for the debugger engine in the project configuration "Debugging" page is "Visual Studio". The "Debug Info" should be set to "Mago", though (this probably needs some cleanup as that is confusing for historic reasons).

When using the "D/C++ Win32 Application" project template, the actual project type is the same as VC++ and the debugger should be starting just the same.
December 01, 2019
On Sunday, 1 December 2019 at 09:33:41 UTC, Rainer Schuetze wrote:
>
>
> On 30/11/2019 19:29, SkyCloud wrote:
>> I'm a novice in D and VisualD. Just installed VisualD 0.51.0-beta1 (a
>> version with DMD/LDC compiler:
>> VisualD-v0.51.0-beta1-dmd-2.089.0-ldc2-1.18.0.exe
>> ) to Visual Studio 2019 16.3.9. It compiles and runs programs normally,
>> but when I try to debug with F5 key, make a breakpoint, the program just
>> starts and executes as there's no debugging mode (like as I pressed
>> Ctrl+F5). So I can't view variables' values and so on. In C++ projects
>> the debugger works normally, so the problem is only with VisualD.
>> 
>> In fact this case is the same to: https://forum.dlang.org/thread/htjjwfynugdshluamgrm@forum.dlang.org But there was Visual Studio Code, not Visual Studio.
>> 
>> Is it just because my Visual Studio is 16.3, but not 16.2, which the current version of VisualD was aimed to? So should I just wait untill the newer version of VisualD will support Visual Studio 16.3?
>> 
>> As I'm a novice to D/VisualD, I do not know what to do. Please, help.
>
> It works here, using VS 2019 16.3.10.
>
> What project type and platform are you using? If you use the "Visual D Win32 Application" project template, the preferred selection for the debugger engine in the project configuration "Debugging" page is "Visual Studio". The "Debug Info" should be set to "Mago", though (this probably needs some cleanup as that is confusing for historic reasons).
>
> When using the "D/C++ Win32 Application" project template, the actual project type is the same as VC++ and the debugger should be starting just the same.

Hi! Thank you so much for the answer. Platform is Windows 7 x64. I checked all the settings you said but unfortunately nothing works.

I recorded a short video with my attempts to debug a program. There are two projects (VisualD and D/C++) with each type and one pure Visual C++ project. Debugging works only in Visual C++ as I mentioned before.
https://1drv.ms/v/s!Ar5BCn3roz_ahSoJMf5pVZTdHYGY

I will be glad if you see it and find anything that can help me.
December 01, 2019

On 01/12/2019 20:19, SkyCloud wrote:
> Hi! Thank you so much for the answer. Platform is Windows 7 x64. I checked all the settings you said but unfortunately nothing works.
> 
> I recorded a short video with my attempts to debug a program. There are two projects (VisualD and D/C++) with each type and one pure Visual C++ project. Debugging works only in Visual C++ as I mentioned before. https://1drv.ms/v/s!Ar5BCn3roz_ahSoJMf5pVZTdHYGY
> 
> I will be glad if you see it and find anything that can help me.

As you can step into C main (the function calling _d_run_main), it seems that the debugger is setup correctly and is working, but doesn't accept the breakpoint set in D's main function.

I suspect that it doesn't work correctly because your user folder contains non-ascii characters that might be encoded badly in the generated debug info. Try moving the project to a different folder.
December 01, 2019
On Sunday, 1 December 2019 at 20:41:13 UTC, Rainer Schuetze wrote:
>
>
> On 01/12/2019 20:19, SkyCloud wrote:
>> Hi! Thank you so much for the answer. Platform is Windows 7 x64. I checked all the settings you said but unfortunately nothing works.
>> 
>> I recorded a short video with my attempts to debug a program. There are two projects (VisualD and D/C++) with each type and one pure Visual C++ project. Debugging works only in Visual C++ as I mentioned before. https://1drv.ms/v/s!Ar5BCn3roz_ahSoJMf5pVZTdHYGY
>> 
>> I will be glad if you see it and find anything that can help me.
>
> As you can step into C main (the function calling _d_run_main), it seems that the debugger is setup correctly and is working, but doesn't accept the breakpoint set in D's main function.
>
> I suspect that it doesn't work correctly because your user folder contains non-ascii characters that might be encoded badly in the generated debug info. Try moving the project to a different folder.

Yes. It works now! Really the problem was in the thing that my user-folder uses cyrillic symbols. Now I can debug my programs and study D language further.

Thank you so much!