To setup debugging for Dlang programs on Windows with VsCode follow these steps:
- make sure you have the D Programming Language (code-d) (VsCode extension) installed
- make sure you have the C/C++ extension pack (VsCode extension) installed
- create a
.vscodefolder at the root of your DLang project - copy the
launch.jsonandtasks.jsoninto it - in the
launch.jsonat line:"program": "./my-app.exe",changemy-app.exeto your executable name (look in thedub.jsonunder name). - click on the debug tab in VsCode, then click on the debug button at the top (or press F5)
Q: When I start debugging, I get the following error popup: Configured debug type 'cppvsdbg' is not supported.
A: Make sure you have the C/C++ extension pack installed. If it is already installed, try reinstalling it.
good job!