Visual D - keep console open

Rainer Schuetze r.sagitario at gmx.de
Thu Aug 8 18:31:52 UTC 2019



On 08/08/2019 18:36, bitwise wrote:
> I just installed Visual D 0.50.1 with Visual Studio 2019, and the
> console wont stay open after I run a console program. Is there a way to
> get that working without adding system("pause") to my code?
> 
> I've tried to start with/without debugging, by explicitly using the menu
> options in Visual Studio, and it won't work.
> 
> I've also disabled this option:
>>> Tools->Options->Debugging->General->Automatically close the console
>>> window...

This option is used when starting the debugger from a VC project
(vcxproj). AFAICT the way VS2019 handles this (reusing the same window)
is rather new and a lot more useful than how it used to work (opening a
new window every time).

> 
> Even the option "Pause when program finishes" from the D project
> settings won't work.

As you noticed this option is for visualdproj projects. It works for
running without debugger for me. Please verify that you have changed
this option for the correct configuration and platform (that's a common
mistake I make).

> 
> *clock ticks*
> 
> It seems the above problem only refers to *.visualdproj projects.
> 
> I guess I can (and maybe should?) just use the new VS project type.

I consider it the preferred project type and the other legacy, though
there are some features only available with the visualdproj projects,
e.g. automatic import paths from project dependencies and "private"
phobos builds for better debugging.


More information about the Digitalmars-d-ide mailing list