Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
aradalvand opened this issue May 1, 2025 · 0 comments
Open
Assignees

Comments

@aradalvand
Copy link

See this comment and this comment.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants