'${workspaceFolder}' can not be resolved. Please open a folder.' on Visual Studio Code
Answer a question
wondering if you could assist. Really challenging in determining a solution to this from my research.
Ive downloaded Visual Studio code two weeks ago and has come across an error once I try to debug a file. The file appears to open but once I run the debugger it shows accordingly:
'${workspaceFolder}' can not be resolved. Please open a folder.
Can't seem to find or replicate a similar solution. I've also tried to reinstall Visual Studio code (no easy feat). I'm trying to at least understand the problem and its source.
The file is a .js file that I've been working on, running a simple function. It is not meant to operate in tandem with a larger workspace/program.
Answers
If you are using the latest Visual Studio 1.44, make sure to upgrade to 1.44.2.
The issue microsoft/vscode
issue 94725 has been resolved.
It featured the same error message:
After some investigation the problem is the following for the workspace configuration our debug extensions appends the following attribute
__workspaceFolder:'${workspaceFolder}'
And the configuration resolver properly tries to resolve this and complains because the scope of the folder is not specified.
In a multi root workspace scope has to be specified, otherwise the resolver does not know against which folder to resolve the variables.Proposed fix: the node extension which adds this attribute should scope it if it sees that we are in a multi root folder.
So instead of${workspaceFolder}
use${FOLDER_NAME:workspaceFolder}
.
This is fixed in commit ae97613.
更多推荐
所有评论(0)