Skip to content

Debugger fails to be launched with correct external terminal path in WSL #247380

@aradalvand

Description

@aradalvand

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version:
Version: 1.99.3 (user setup)
Commit: 17baf841131aa23349f217ca7c570c76ee87b957
Date: 2025-04-15T23:18:46.076Z
Electron: 34.3.2
ElectronBuildId: 11161073
Chromium: 132.0.6834.210
Node.js: 20.18.3
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.26100
  • OS Version: Ubuntu 24.04.1 LTS (WSL2)

Steps to Reproduce:
I'm on WSL2 (Ubuntu):

  1. Install the C# extension.
  2. Add a .vscode/launch.json like this following (the key bit being "console": "externalTerminal".
{
	// Use IntelliSense to learn about possible attributes.
	// Hover to view descriptions of existing attributes.
	// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
	"version": "0.2.0",
	"configurations": [
		{
			"name": ".NET Core Launch (web)",
			"type": "coreclr",
			"request": "launch",
			"preLaunchTask": "build",
			"program": "${workspaceFolder}/artifacts/bin/Shenas.Server/debug/Shenas.Server.dll",
			"args": [],
			"cwd": "${workspaceFolder}/src/Shenas.Server",
			"stopAtEntry": false,
			"console": "externalTerminal",
			"env": {
				"ASPNETCORE_ENVIRONMENT": "Development"
			},
			"sourceFileMap": {
				"/Views": "${workspaceFolder}/Views"
			}
		},
		{
			"name": ".NET Core Attach",
			"type": "coreclr",
			"request": "attach"
		}
	]
}
  1. Set the external terminal path (Linux) in user settings to /mnt/c/Users/USER_NAME/AppData/Local/Microsoft/WindowsApps/wt.exe -w 0 (replace USER_NAME with your user)

Image

  1. Launch the debugger through this profile — the following error will appear:

Image

Googled the error but couldn't find anything relevant. If this is fixable on my end, please let me know.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions