Setting up VS Code on Windows for debugging

felixfxu felixfxu at gmail.com
Mon Sep 29 09:27:20 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?

It should be possible, because I'm using it.

The installed extensions in vscode includes: code-d, serve-d

Then `.vscode/launch.json` is like:

```
     "configurations": [
         {
             "type": "code-d",
             "request": "launch",
             "dubBuild": true,
             "name": "Build & Debug DUB project",
             "cwd": "${command:dubWorkingDirectory}",
             "program": "${command:dubTarget}"
         },
     ]
```



More information about the Digitalmars-d-learn mailing list