-
Notifications
You must be signed in to change notification settings - Fork 344
Description
Describe the bug
Sources can only be pretty-printed when the app that is being debugged is paused. There is no indication of this as long as the app is running. This means that this feature is impossible to find for a user who has not stopped their application.
To Reproduce
- Open any app with this debugger attached
- Browse any source (for example, from "loaded scripts" or from the debug console)
- Notice that there is no "pretty print" editor command on the top right
- Notice that there are no results when searching for "pretty print" via the command palette.
Log File
Not provided, since I am aware that this was implemented intentionally as per #1539.
VS Code Version
Version: 1.95.2
Release: 24313
Commit: 7656a0bea17ba6cf301721572e10c9035bb378e6
Date: 2024-11-08T18:21:12.757Z
Electron: 32.2.1
ElectronBuildId: undefined
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Linux x64 6.11.4
js-debug Version: v1.95.2 (from nixpkgs)
Additional context
As stated above, I am aware that this behavior was implemented to mitigate another issue. In my eyes, it is very unexpected: I just spent ~1h searching the internet on how I could achieve pretty-printing in this extension, then finding out it supports it, while it did not seem to on my machine. Only after finding #1539 I tried pausing – with great success!
Suggestion
I think the extension should act similarly whether the debugged app is paused or not, especially regarding the visibility of UI elements and commands, and if it can't be helped, it should instead display a notice explaining the limitation when the pretty-print command is triggered while the app is running. Or perhaps the app could be paused shortly while the sources are being pretty-printed? That would be the favorable solution to me personally, although I can see that this might be perceived as surprising behavior by some.
Most importantly, I think that the pop-up notification offering to pretty-print minified sources should appear when the application is running, and explain this limitation.
PS: I was not sure whether to file this under "bug" or "feature request", but since this is about unexpected behavior, I figured that "bug" was probably more appropriate. Feel free to re-tag though :)