When checking this for a macOS path like /data/vscode/test-project-folder, the scheme is set to file. Looking to the documentation, this should be file. The scheme for this URI is C, which is something VS Code its file system provider does not understand. Whenever I parsed the above Windows path, I received the following path: C:/data/vscode/test-project-folder. To open a project folder, VS Code requires the following URL format: vscode://file// - example: vscode://file/c:/myProject/. This documentation led me to the solution of opening Windows-based folder paths. While searching through the VS Code issues and documentation, I found the following information on opening VS Code with URLs. When I opened the folder from the command, I spotted the following error in the debug console: No file system provider found for resource. The above code works fine on macOS and Linux but gives issues on Windows paths.įirst, I thought it had to do with the \ backslashes, but replacing these with / forward slashes did not change the behavior. The folder path needs to be parsed to a URI to use the command. executeCommand ( `vscode.openFolder`, folderUri ) Const folderPath = `C:\\data\\vscode\\test-project-folder` const folderPathParsed = folderPath.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |