Skip to content
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

"'${workspaceFolder}' can not be resolved in a multi folder workspace" although ${workspaceFolder} is not used #1499

Closed
plaili opened this issue May 13, 2021 · 4 comments
Assignees
Labels
debug/legacy legacy debug adapter related issues - new issues won't be fixed Debug Issues related to the debugging functionality of the extension. FrozenDueToAge
Milestone

Comments

@plaili
Copy link

plaili commented May 13, 2021

Used SW:
Version: 1.57.0-insider
Commit: 659175fa39b994fc39381b0af2874c85efeb2a01
Date: 2021-05-13T05:12:05.031Z
Electron: 12.0.4
Chrome: 89.0.4389.114
Node.js: 14.16.0
V8: 8.9.255.24-electron.0
OS: Darwin arm64 20.4.0

Go for VSCode v0.25 (works fine when going back to v0.24.2)

Launching this remote debug configuration always fails:

		{
			"name": "Connect to content",
			"type": "go",
			"request": "attach",
			"mode": "remote",
			"port": 59136,
			"host": "127.0.0.1"
		}

Message is:
'${workspaceFolder}' can not be resolved in a multi folder workspace

@gopherbot gopherbot added this to the Untriaged milestone May 13, 2021
@suzmue suzmue self-assigned this May 13, 2021
@suzmue suzmue added the Debug Issues related to the debugging functionality of the extension. label May 13, 2021
@suzmue
Copy link
Contributor

suzmue commented May 13, 2021

Thanks for the report! We set the cwd to "${workspaceFolder}" by default if it is not specified in the attach configuration.

In v0.25.0 we switched to not resolving the home directory ourselves, and letting vscode do this (#1448).

Would you mind setting "cwd": "${fileWorkspaceFolder}? If that works for you, I think that in a multi folder workspace we could use that as a default instead.

@plaili
Copy link
Author

plaili commented May 13, 2021

Would you mind setting "cwd": "${fileWorkspaceFolder}? If that works for you, I think that in a multi folder workspace we could use that as a default instead.

Yes, it works.

@suzmue
Copy link
Contributor

suzmue commented May 13, 2021

I will make the change to use "${fileWorkspaceFolder}" by default if there are multiple workspace folders.

Another way to specify the specific workspace folder you want to run the remote attach in is to set:
"cwd": "${workspaceFolder:folderName}"

This will run it in the workspace folder specified by folder name.

@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/319809 mentions this issue: src/goDebugConfiguration: use fileWorkspaceFolder in multi root workspace

@polinasok polinasok added the debug/legacy legacy debug adapter related issues - new issues won't be fixed label Jul 16, 2021
@golang golang locked and limited conversation to collaborators Jul 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug/legacy legacy debug adapter related issues - new issues won't be fixed Debug Issues related to the debugging functionality of the extension. FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

4 participants