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

custom file prefix in error stack #5236

Closed
farfromrefug opened this issue Feb 3, 2020 · 6 comments
Closed

custom file prefix in error stack #5236

farfromrefug opened this issue Feb 3, 2020 · 6 comments
Assignees
Labels
Milestone

Comments

@farfromrefug
Copy link
Contributor

When you "translate" an error stack line with source maps here you add a file:/// prefix to the file path.
This makes it impossible to use "CTRL+Click" to open the file at line/column which would be incredibly useful.
I dont know why you do this but i suppose it is to get this to work on another IDE.

Can you make this customizable ?

@rosen-vladimirov rosen-vladimirov self-assigned this Feb 19, 2020
@rosen-vladimirov rosen-vladimirov added this to the 6.4.1 milestone Feb 19, 2020
@rosen-vladimirov
Copy link
Contributor

Hey @farfromrefug ,
Thanks for pointing this UX problem, I've created a PR to replace the file:/// with file: when CLI prints the logs.
We've tried to persist the same output coming from the device itself, that's why we've kept the file:/// until now. However, we've discussed your suggestion and we've decided to implement it as it will be really useful for everyone. Thanks for the idea.

@farfromrefug
Copy link
Contributor Author

@rosen-vladimirov thanks! do you know if file: works with vscode? if not would be good for it to be "customizable"

@rosen-vladimirov
Copy link
Contributor

Hey @farfromrefug ,
I've used file: (note the space at the end), just to keep the output as similar as possible to the current one.
I've also tested it in VSCode's terminal and I was able to click on the link and it navigated to the correct file and even the exact line.

@dtopuzov
Copy link
Contributor

dtopuzov commented Feb 20, 2020

Available in nativescript@rc, will be shipped with nativescript@6.4.1.

@farfromrefug
Copy link
Contributor Author

@rosen-vladimirov Seems to be good but not completely:
Screen Shot 2020-02-24 at 14 32 54
I don't know why the Object.p ... is still using file:///

@farfromrefug
Copy link
Contributor Author

@rosen-vladimirov found another issue
Screen Shot 2020-02-25 at 14 16 17
the file in webpack is ../../src/opencv.android.ts. Though the cli still adds app/ in front so vscode cant pick up the link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants