Start Debugging with js file outside of project results in wrong path #125796
Closed
Description
opened on Jun 9, 2021
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version:
$ code --version 1.56.2 054a9295330880ed74ceaedda236253b4f39a335 x64
- OS Version:
$ ver Microsoft Windows [Version 10.0.19043.985]
Steps to Reproduce:
- make sure node.exe is on your path
- git clone https://github.com/aaronla-ms/bug-repros.git
- cd bug-repros\vscode-lost\src\example
- code .
- in VSCode, open file ....\out\Debug-x64\example.out.js
- Click Run > Start Debugging > Node.js
Expected:
Correct script is run, successfully
Actual:
Does not run script. Uses wrong path, and prints following error in Debug Console window:
C:\toolbin\nodejs\node.exe ..\out\Debug-x64\example.out.js
Process exited with code 1
Uncaught Error: Cannot find module 'c:\repos\aaronla-ms\bug-repros\vscode-lost\src\out\Debug-x64\example.out.js'
Notice that we did not open "vscode-lost\src\out", we opened a file from "vscode-lost\out". The path is wrong.
Activity