gpt4 book ai didi

visual-studio-code - '${workspaceFolder }' can not be resolved. Please open a folder.' on Visual Studio Code

转载 作者:行者123 更新时间:2023-12-04 00:01:12 29 4
gpt4 key购买 nike

想知道你是否可以提供帮助。从我的研究中确定解决方案真的很有挑战性。

我两周前下载了 Visual Studio 代码,但在尝试调试文件时遇到了错误。该文件似乎打开了,但是一旦我运行调试器,它就会相应地显示:

无法解析“${workspaceFolder}”。请打开一个文件夹。

似乎无法找到或复制类似的解决方案。我还尝试重新安装 Visual Studio 代码(绝非易事)。我试图至少了解问题及其根源。

该文件是我一直在处理的 .js 文件,运行一个简单的函数。它并不意味着与更大的工作空间/程序协同工作。

最佳答案

如果您使用的是最新的 Visual Studio 1.44,请确保升级到 1.44.2。

问题 microsoft/vscode issue 94725 已解决。
它具有相同的错误消息:

https://user-images.githubusercontent.com/9964210/78838126-65c76d80-79ed-11ea-8572-a092f1576dbc.png

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}.



这已在 commit ae97613 中修复。

关于visual-studio-code - '${workspaceFolder }' can not be resolved. Please open a folder.' on Visual Studio Code,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61238046/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com