From r.sagitario at gmx.de Sun Dec 1 09:33:41 2019 From: r.sagitario at gmx.de (Rainer Schuetze) Date: Sun, 1 Dec 2019 10:33:41 +0100 Subject: Visual D can't debug programs In-Reply-To: References: Message-ID: 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 at 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. From andry_wllfli at mail.ru Sun Dec 1 19:19:33 2019 From: andry_wllfli at mail.ru (SkyCloud) Date: Sun, 01 Dec 2019 19:19:33 +0000 Subject: Visual D can't debug programs In-Reply-To: References: Message-ID: 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 at 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. From r.sagitario at gmx.de Sun Dec 1 20:41:13 2019 From: r.sagitario at gmx.de (Rainer Schuetze) Date: Sun, 1 Dec 2019 21:41:13 +0100 Subject: Visual D can't debug programs In-Reply-To: References: Message-ID: 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. From andry_wllfli at mail.ru Sun Dec 1 21:07:37 2019 From: andry_wllfli at mail.ru (SkyCloud) Date: Sun, 01 Dec 2019 21:07:37 +0000 Subject: Visual D can't debug programs In-Reply-To: References: Message-ID: 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! From basyambhu at gmail.com Sat Dec 28 20:05:46 2019 From: basyambhu at gmail.com (Yash Bhambhu) Date: Sat, 28 Dec 2019 20:05:46 +0000 Subject: budding d programmer seeking guidance for an issue Message-ID: I am working on issue #20412 which is std.range.pustd.outputrange.put() misbehave s when defined for void[] misbehaves when OutputRange.put(void[] exists) I started checking one by one for which case matches for input ranges and output range in put function and concluded that it matches the last if-else statement which is else static if (isInputRange!E && is(typeof(put(r, e.front)))) and it then pops front till range is empty which is its expected behavior but when we call put(r,e) it spits out random jargon which cant be in any possible case that comes under the power of put function. I'm seeking further help and guidance on the same. From rtcvb32 at yahoo.com Sat Dec 28 20:24:14 2019 From: rtcvb32 at yahoo.com (Era Scarecrow) Date: Sat, 28 Dec 2019 20:24:14 +0000 Subject: budding d programmer seeking guidance for an issue In-Reply-To: References: Message-ID: On Saturday, 28 December 2019 at 20:05:46 UTC, Yash Bhambhu wrote: > I am working on issue #20412 which is > std.range.pustd.outputrange.put() misbehave s when defined for > void[] misbehaves when OutputRange.put(void[] exists) In the case where void[] is passed, could it cast to ubyte[]? Probably not the answer you're looking for... From rtcvb32 at yahoo.com Sat Dec 28 20:27:12 2019 From: rtcvb32 at yahoo.com (Era Scarecrow) Date: Sat, 28 Dec 2019 20:27:12 +0000 Subject: budding d programmer seeking guidance for an issue In-Reply-To: References: Message-ID: On Saturday, 28 December 2019 at 20:05:46 UTC, Yash Bhambhu wrote: > but when we call put(r,e) it spits out random jargon which cant > be in any possible case that comes under the power of put > function. Thinking about it a little further, void would mean it doesn't actually do anything with the array handed to it. So when you try to do _anything_ with void, it is pretty much ignored, meaning you're just getting the results that just happened to be in EAX (or whatever register it would have been working with) at the time.