dotnet / dotnet/vscode-csharp

justMyCode does not seem to work

Open
#8,388 0 comments 0 reactions 0 assignees View on GitHub
Bug Debugger untriaged
Dominant language
TypeScript
Stars
3.1k
Forks
737
Avg merge
18h 40m
Merged PRs (30d)
31

Description

Originally from: https://github.com/microsoft/vscode-dotnettools/issues/2107
By: @AntoineC4Ci
----------------------
### Describe the Issue

## Context
We're developing in C# using DevKit in VSCode, using devcontainer.
The workspaceName.code-worskpace configuration explicitly includes "justMyCode": true:

```json
"launch": {
"version": "0.2.0",
"configurations": [
{
"name": "SERVER",
"type": "coreclr",
"request": "launch",
"justMyCode": true,
"preLaunchTask": "build-server",
"program": "${workspaceFolder:ROOT}/server/apps/xyz/bin/Debug/net9.0/workspacename",
"launchSettingsFilePath": "${workspaceFolder:ROOT}/server/apps/solution.ds/Properties/launchSettings.json",
"launchSettingsProfile": "http",
"internalConsoleOptions": "neverOpen",
"cwd": "${workspaceFolder:ROOT}/server/apps/xyz/xyz"
}
]
},
```

the ${workspaceFolder:ROOT}/server/apps/solution.ds/Properties/launchSettings.json file looks like:
```json

{
"$schema": "http://json.schemastore.org/launchsettings.json",
"profiles": {
"http": {
"commandName": "Project",
"applicationUrl": "http://localhost:4210",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
```

We expect the debugger to stop only within our own code, and skip stepping into or stopping in Microsoft/.NET library code (e.g., LINQ internals, System.* classes).

## Issues Observed

Exceptions break inside .NET library code, not in user code:

For example, a System.InvalidOperationException thrown by a LINQ query (like .First()) breaks inside Microsoft’s implementation instead of at the line in user code that triggered it.

F10 (Step Over) still enters Microsoft methods:

Even when stepping over methods like LINQ or other framework calls, the debugger steps into .NET assemblies instead of skipping them.

These behaviors indicate that "justMyCode": true is not functioning as intended.

Any idea ?

Thanks

### Expected Behavior

I expect the debugger to work like in VS : just in my code.

### Environment Information

VSCode:
Version: 1.101.1 (system setup)
Commit: 18e3a1ec544e6907be1e944a94c496e302073435
Date: 2025-06-18T13:35:12.605Z
Electron: 35.5.1
ElectronBuildId: 11727614
Chromium: 134.0.6998.205
Node.js: 22.15.1
V8: 13.4.114.21-electron.0
OS: Windows_NT x64 10.0.26100

DevKit:
Identifier
ms-dotnettools.csdevkit
Version
1.20.35

DotNet 9.0

Windows 11

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.