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

Map paths for console.error(...) #412

Closed
s4m0r4m4 opened this issue Apr 3, 2020 · 9 comments
Closed

Map paths for console.error(...) #412

s4m0r4m4 opened this issue Apr 3, 2020 · 9 comments
Assignees
Labels
feature-request Request for new features or functionality verification-needed Verification of issue is requested verification-steps-needed Steps to verify are needed for verification verified Verification succeeded
Milestone

Comments

@s4m0r4m4
Copy link

s4m0r4m4 commented Apr 3, 2020

Original discussion in the 'vscode-chrome-debug-core' repo here: microsoft/vscode-chrome-debug-core#553

Long story short, I would like to request a feature in which console.error() messages are also processed to map paths back to source files. This would be helpful for angular developers where the main typescript file that bootstraps the app is setup to catch any errors and use console.erorr() to display them in the console. Please let me know if you need more info!

@connor4312 connor4312 added the feature-request Request for new features or functionality label Apr 3, 2020
@connor4312 connor4312 added this to the April 2020 milestone Apr 3, 2020
@connor4312
Copy link
Member

Good idea, should be fairly easy

@connor4312 connor4312 modified the milestones: April 2020, May 2020 May 4, 2020
@connor4312
Copy link
Member

This might slip to June. The stacks of logged errors isn't easy to pluck out--we need to actually do some string parsing. This introduces some complexity, and at the moment the console message handling we do is very simple and imperative. I'd like to clean up and extract some of this logic rather than tacking it onto what we have today.

@s4m0r4m4
Copy link
Author

Thanks for the update! I appreciate it.

@connor4312
Copy link
Member

@connor4312 connor4312 added the verification-needed Verification of issue is requested label Aug 31, 2020
@roblourens roblourens added verified Verification succeeded verification-found Issue verification failed and removed verified Verification succeeded labels Sep 2, 2020
@roblourens
Copy link
Member

I think this isn't working for me. Just added console.error(new Error('fail')) to some TS.

vscode-debugadapter-4.json.gz

@roblourens roblourens reopened this Sep 2, 2020
@roblourens
Copy link
Member

image

@connor4312
Copy link
Member

It looks like the first line of the stack isn't in parens, so our regex doesn't match it.

It should match the 3rd line, but that looks like it's in a TS header that won't have a source map location.

@connor4312 connor4312 removed the verification-found Issue verification failed label Sep 2, 2020
@bpasero bpasero added the verification-steps-needed Steps to verify are needed for verification label Sep 3, 2020
@bpasero
Copy link
Member

bpasero commented Sep 3, 2020

Unclear how to verify.

@weinand weinand added the verified Verification succeeded label Sep 3, 2020
@weinand
Copy link

weinand commented Sep 3, 2020

*.js files are mapped back to *.ts (if possible):

2020-09-03_17-40-31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality verification-needed Verification of issue is requested verification-steps-needed Steps to verify are needed for verification verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants