dotnet / dotnet/vscode-csharp

CLR attach fails with configurationDone 0x80070057 on .NET Framework (Windows)

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

Description

When attaching the debugger to a .NET Framework 4.x process (e.g. ASP.NET Web API running under IIS Express), the CLR attach fails with:

```
Failed command 'configurationDone' : 0x80070057
```

**Environment:**
- **OS:** Windows 10/11 (build [your build if known])
- **Editor:** Cursor [version] (or VS Code [version])
- **Extension(s):** C# (ms-dotnettools.csharp) [version], C# Dev Kit (ms-dotnettools.csdevkit) [version if installed]

**App being debugged:** .NET Framework 4.x (ASP.NET Web API on IIS Express).

**launch.json attach configuration:**

Using `type: "clr"`, `request: "attach"`, with either `processName` or `processId`:

```json
{
"name": "Attach to IIS Express",
"type": "clr",
"request": "attach",
"processName": "iisexpress",
"cwd": "${workspaceFolder}",
"requireExactSource": false
}
```

Also occurs with configs that use `processId` (numeric or from an input like `"${input:attachPid}"`).

**Steps to reproduce:**
1. Open a .NET Framework solution in Cursor/VS Code.
2. Start the app (e.g. IIS Express) so the process is running.
3. Run and Debug → select the CLR attach config (e.g. "Attach to IIS Express") → F5.
4. The error `Failed command 'configurationDone' : 0x80070057` appears and attach does not complete.

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.