Skip to content

After importing @sentry/browser, the Chrome console outputs wrong file and line number. #1792

@bs-thomas

Description

@bs-thomas

Package + Version

  • @sentry/browser
  • @sentry/node
  • raven-js
  • raven-node (raven for node)
  • other:

Version:

4.4.1

Description

I use webpack 4.19.1 (thought I believe it doesn't really matter) for my frontend build system.
I have sourcemaps that I can see in Chrome when I run my application. They are supposed to tell me which line of code I'm having some console.log output.

image

However, when I install sentry, my logs become like this:

image

This doesn't only happen for console logs. Even if I throw some error, it still doesn't tell me where the actual error is in Chrome anymore:

image

I was thinking if this is related to the deepness of the "stack level". For instance, if it's supposed to display 4 levels up, but it's displaying 3 levels up, resulting it the file and line number to be always the "same".

With this issue it's really hard to debug things. So I was wondering if anyone may know what the problem is, and if this can be resolved somehow.

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions