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

line numbers don't match source code in chrome://inspect performance tab #25349

Open
skybrian opened this issue Sep 2, 2024 · 2 comments
Open
Labels
bug Something isn't working correctly

Comments

@skybrian
Copy link

skybrian commented Sep 2, 2024

Version: Deno 1.46.2
Chrome 128.0.6613.114

I'm using the --inspect-wait flag to profile some Deno code. To reproduce:

git clone git@github.com:skybrian/repeat-test.git
cd repeat-test
git checkout 389357e1b3e2546dbefc6b9d9984760509b13ee2
deno --inspect-wait performance/profile_take_chars.ts

The profile runs automatically after the inspector connects and the flame graph appears after a second or two, but when I look at individual functions in the call graph, the line numbers are off. For example, there are two prune() functions that are reported to be at lines 66 and 263 of pick_tree.ts, but in the pick_tree source code, these functions are actually at 111-136 and 342-365.

Presumably the code is being transformed in some way before it's run? It would be nice if that transformation preserved newlines so that the line numbers match.

@marvinhagemeister
Copy link
Contributor

marvinhagemeister commented Sep 2, 2024

Related #4499

@lucacasonato lucacasonato added the bug Something isn't working correctly label Sep 2, 2024
@lucacasonato
Copy link
Member

@marvinhagemeister I'm not sure this is related - this TS code is being transpiled by Deno, not JS files coming from the user with custom source maps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

3 participants