Skip to content

Start Debugging with js file outside of project results in wrong path #125796

Closed
@ghost

Description

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:

  1. make sure node.exe is on your path
  2. git clone https://github.com/aaronla-ms/bug-repros.git
  3. cd bug-repros\vscode-lost\src\example
  4. code .
  5. in VSCode, open file ....\out\Debug-x64\example.out.js
  6. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugdebugDebug viewlet, configurations, breakpoints, adapter issuesverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions