Using VS Code: Command Variable extension.commandvariable.file.relativeDirDots in launch.json for generating the a python module dot path.
If the WorskapceFolder is first in Workspace or is in a VS Code instance with just the open folder, ${command:extension.commandvariable.file.relativeDirDots}.${fileBasenameNoExtension}, generates the expected dot path.
If WorkspaceFolder is not first in Workspace, ${command:extension.commandvariable.file.relativeDirDots} returns "Unknown", showing error "File not in workspace folder"
I am unsure if this is an intended issue due to wanting to always reference modules from the first workspace when working in other Workspace(seems unlikely), or with how the workspace folder path is being generated.
Glancing at the API and how it is behaving, my guess is folders[0].uri.path returns the first listed WorkspaceFolder path and not the files WorkspaceFolder.
All WorkspaceFolders are in the same root directory with .code-workspace path only referencing the folder name
Environment: VS Code 1.39.2
Language: Python 3.7
OS: Windows NT x64 10.0.18362
Using VS Code: Command Variable
extension.commandvariable.file.relativeDirDots
in launch.json for generating the a python module dot path.If the WorskapceFolder is first in Workspace or is in a VS Code instance with just the open folder,
${command:extension.commandvariable.file.relativeDirDots}.${fileBasenameNoExtension}
, generates the expected dot path.If WorkspaceFolder is not first in Workspace,
${command:extension.commandvariable.file.relativeDirDots}
returns "Unknown", showing error "File not in workspace folder"I am unsure if this is an intended issue due to wanting to always reference modules from the first workspace when working in other Workspace(seems unlikely), or with how the workspace folder path is being generated. Glancing at the API and how it is behaving, my guess is
folders[0].uri.path
returns the first listed WorkspaceFolder path and not the files WorkspaceFolder.All WorkspaceFolders are in the same root directory with .code-workspace path only referencing the folder name Environment: VS Code 1.39.2 Language: Python 3.7 OS: Windows NT x64 10.0.18362