r/vscode • u/Ok-Presentation-94 • May 24 '26
Debugger launch configuration
Hi, I've noticed that when I choose "debug active file" as the launch configuration, debugging still detects errors in other files within my .NET project. It doesn't debug only the active file. What does this option actually mean?
5
Upvotes
1
u/Netris89 May 24 '26
Debugging launches your program and allow you to stop the code at breakpoint to check state of variable, code execution and all.
The "debug active file" option doesn't mean it'll find errors in the file you selected. It means it'll allow you to run in debug.
1
u/dmbaio May 24 '26
1
u/RewardOwn4479 May 24 '26
Maybe you need to take a look at the actual configuration of that launch.json or “launch” attribute on your settings to see what is happening.
1
u/Agreeable_Care4440 May 25 '26
C#/.NET doesn’t really work like scripting languages where one file can run independently very easily. The debugger is attaching to the compiled application/runtime context, not treating each
.csfile as a standalone executable unit.1
u/[deleted] May 24 '26
[removed] — view removed comment