Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vscode cannot open files from nodejs stack trace with line number if outside of project folder #221693

Closed
JoernBerkefeld opened this issue Jul 15, 2024 · 4 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@JoernBerkefeld
Copy link

JoernBerkefeld commented Jul 15, 2024

Does this issue occur when all extensions are disabled?: Yes/No
Yes

  • VS Code Version: 1.91.0
  • OS Version: Win 11

Steps to Reproduce:

  1. write and application that logs error stack trace to a file
  2. execute that application in a different workspace
  3. open the log file in that different workspae
  4. try and click on it
  5. get the "Unable to open file:js:1000:16" error

sample stack trace with failing links:
`
10:04:00.241 debug: TypeError: Cannot read properties of undefined (reading 'id')
at Asset.setFolderPath (file:///C:/Git/sfmc-devtools/lib/metadataTypes/Asset.js:994:35)
at Asset.postRetrieveTasks (file:///C:/Git/sfmc-devtools/lib/metadataTypes/Asset.js:572:14)

`

workaround:
option 1: remove the line number and column and things start working immediately
option 2: drag & drop the log file from your "different workspace" over to the vscode window for the application you built and the links start working immediately

sample stack trace with working links for option 1:
`
10:04:00.241 debug: TypeError: Cannot read properties of undefined (reading 'id')
at Asset.setFolderPath (file:///C:/Git/sfmc-devtools/lib/metadataTypes/Asset.js)
at Asset.postRetrieveTasks (file:///C:/Git/sfmc-devtools/lib/metadataTypes/Asset.js)

`

@vscodenpa
Copy link

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.91.1. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@JoernBerkefeld JoernBerkefeld changed the title Vscode cannot open files from nodejs stack trace with linenumber Vscode cannot open files from nodejs stack trace with line number Jul 15, 2024
@JoernBerkefeld
Copy link
Author

the same links work when printed to output / terminal tab but not when clicked on in a .log file

@JoernBerkefeld JoernBerkefeld changed the title Vscode cannot open files from nodejs stack trace with line number Vscode cannot open files from nodejs stack trace with line number if outside of project folder Jul 16, 2024
@JoernBerkefeld
Copy link
Author

i updated the use case with another workaround (option 2)

@roblourens
Copy link
Member

#34026

@roblourens roblourens added the *duplicate Issue identified as a duplicate of another issue(s) label Jul 25, 2024
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Sep 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

3 participants