Setting up VS Code on Windows for debugging
evilrat
evilrat666 at gmail.com
Mon Sep 29 09:30:03 UTC 2025
On Sunday, 28 September 2025 at 10:47:45 UTC, Brother Bill wrote:
> I am using VS Code on Windows, and would like to use standard
> debugging, such as breakpoints, examining variable contents,
> etc.
>
> I am unable to do so, instead adding writeln to examine the run
> time.
> FWIW, author Adam Freeman prefers this approach, eschewing the
> debugger.
>
> But if I wanted to use the VSCode debugger, what configuration
> steps to make it available and working?
you need 'C++' extension, after setting it up it is
straightforward process - simply add a C++ debug target and set
your executable and arguments (if any). for maximum compatibility
you might also want to build your program with -gc flag that will
try to emit C++ compatible debug info. due to TLS by default and
some other D features some debugging niceties like struct members
might not work correctly.
More information about the Digitalmars-d-learn
mailing list