jlfwong / speedscope

🔬 A fast, interactive web-based viewer for performance profiles.
https://www.speedscope.app
MIT License
5.59k stars 246 forks source link

Link display to source code #410

Open jvahue opened 2 years ago

jvahue commented 2 years ago

It would be nice if I could be scanning down the stack and somehow get to the actual source code line being referenced. When looking at the trace it's cumbersome to have to manually go back to the code to see what line the trace is referring to. Some kind of setup file to link an editor with a cmd line syntax for that editor to open a file and go to that line would be great.

Possible double clicking on the item in the summary statistics takes you to the code it is referencing.

technicalpickles commented 1 year ago

This would be super useful. I find myself having to copy & paste the file path, and open manually in an editor or on GitHub.

Some kind of setup file to link an editor with a cmd line syntax for that editor to open a file and go to that line would be great.

Some editors register URI-handlers, ie for VS Code, plugins can register they will handle vscode:// URLs: https://github.com/microsoft/vscode-extension-samples/tree/main/uri-handler-sample

It might also be possible to configure a mapping, where if a file path is starts with /app/, and you configure a GitHub user/repo/sha, then you can construct a URL to go directly to it.

sransara commented 1 year ago

Just pushed an update in my Speedscope in VSCode extension to support rudimentary linking support from the detail view.

Many thanks to @jlfwong for the awesome tool.

jlfwong commented 1 year ago

@sransara Coool! Thanks for sharing this!