forked from microsoft/vscode-js-debug
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: initial work on profiling (microsoft#392)
This PR implements basic .cpuprofile capturing for debug sessions. - Users can start profiling through a context menu on the debug session, or by running a command from the palette. If there's more than one session, running a command will open a quickpick to choose the session to profile. - They will then be asked what kind of profile they want to record. For Node.js this will be .cpuprofiles and .heapprofiles. For browsers, it will allow the newer trace profiles. - While profiling, the debugger is disabled, like the chrome devtools does. This removes performance overhead and the ability to hit breakpoints, which mess with the profile... - Profiling state is shown in the status bar, and clicking on the entry will stop profiling and ask the user where they want to save the profile file. There's also a 'stop profiling' command. This should give us a good foundation for further types and profiling mechanics in the future. I'm not totally happy with the entry and exitpoints as-is. You have to know it's there to be able to start profiling, and then it's kind of hard to figure out how to stop profiling. The chrome devtools shows an overlay while profiling, which prevents the user try to e.g. set breakpoints or use the REPL, implicitly communicating that debugging is not possible in this state. I'm not sure what the best solution for us is. cc @roblourens @ididorn for thoughts. Will also bring this/whatever we discuss up in next week's UX sync.
- Loading branch information
1 parent
564e3e1
commit 8b680f1
Showing
26 changed files
with
1,425 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.