vscode: Allow debug extensions to show diagnostic information in the breakpoints view
js-debug has a breakpoint helper to diagnose issues. It’s there and there’s some heuristics for when we show a notification, but notifications are disruptive, thus the heuristics are conservative, and thus not many people know about the tool. Something that could be helpful is a contribution point that would show markdown text below the breakpoints in the BREAKPOINTS view. js-debug could embed a command link there to open the diagnostic tool, and use a when
clause to show it at appropriate times.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 30 (30 by maintainers)
Commits related to this issue
- Allow debug extensions to show diagnostic information in the breakpoints view Fixes #142870 — committed to microsoft/vscode by roblourens 2 years ago
- Allow debug extensions to show diagnostic information in the breakpoints view (#150558) Fixes #142870 — committed to microsoft/vscode by roblourens 2 years ago
- Show unverified breakpoint warning on breakpoint hover For #142870 — committed to microsoft/vscode by roblourens 2 years ago
- Debug breakpoint warning improvements (#151379) * Show unverified breakpoint warning on breakpoint hover For #142870 * Add warning icon to breakpoint hover as well * Filter breakpoint warning ... — committed to microsoft/vscode by roblourens 2 years ago
👍
I was bugging @connor4312 for unbound breakpoints in a project which has a wrong webpack output config. Due to the misconfig, the source maps are wrong. It would be helpful the unbound breakpoint has some tooltip/hover as suggested above and send to me a diagnostic/troubleshooting view.
I like this too! and if we want to make this stand out a bit more, we could append it to the header’s label. IMO this makes sense because the icon is always visible like the label, and not only on hover.
And @connor4312 said that we should make it clear that only the extension that owns the DebugSession should use this API. I won’t try to restrict any other extension from calling it and possibly wiping out the message that the DA extension set, but that would basically be misuse of the API, any API can be misused.
I like how it looks.
The common way for DA’s to communicate is to use a custom DAP call and then
onDidReceiveDebugSessionCustomEvent
in the EH.going on a debug session makes the most sense to me. Probably one message per session.
I think we have 4 options, 3 DAP-based and 1 extension-API based:
SetBreakpoints
request returnsBreakpoint
objects with information about the verified or unverified breakpoints. EveryBreakpoint
object has amessage
property with this description: “An optional message about the state of the breakpoint. This is shown to the user and can be used to explain why a breakpoint could not be verified.” Using this message would require a diagnostic information UI per breakpoint (as pointed out by @connor4312 this approach is too fine grained for the breakpoint diagnostic information provided by js-debug).message
property on theSetBreakpointsResponse
but this request is still per resource (file). So multiple messages could be returned when starting debugging and a UI would have to deal with that. So this is again too fine grained for the breakpoint diagnostic information provided by js-debug.showBreakpointsInfoMessage
would supply the client with a markdown string whenever breakpoints are amiss. The client would show the information with the same logic as option 3. Here we would not have the “markdown” problem, but instead the problem that the extension does not have easy access to information about unverified breakpoints (because the DA is a separate process).@roblourens @connor4312 did I miss anything?
My preference is option 4.