question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support disabling/enabling a breakpoint.

See original GitHub issue

Turning on and off breakpoints is quite a common operation. Could we support a dedicated disable enable breakpoint operation ?

As far as I know, one can only delete a breakpoint today. If the user wants to temporarily not use a breakpoint, she needs to remove it. Later on once she wants to break at the same spot, she needs to find the same line and create a new breakpoint. The id of the breakpoint will also be distinct. This is quite cumbersome.

Instead a much simpler enable/disable breakpoint operation would make the workflow much simpler. One could have BreakpointEnable <ID> BreakpointDisable <ID> commands and the BreakpointWindow would have a new column showing enabled,disabled state.

In addition, we could support e d key bindings if the vim cursor is on the BreakpointWindow. e would enable the breakpoint under cursor, similarly d would disable.

Something similar also exists in gdb, pdb debuggers.

I unfortunately do not know whether the dbgp protocol or xdebug has the necessary support for this. Can anyone comment on possible implementation ?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
lucccommented, Dec 10, 2018

Patching xdebug or dbgp is not in the scope of this project. Whoever wants to do something like this can obviously go upstream and do it.

I think for vdebug we should plan and work with the existing protocol. So it seems that the only solution is to keep some state of “disabled” (but officially deleted) breakpoints in vdebug. Now if you want persistence of ids we need to check how vdebug constructs its ids. If they are provided by dbgp we might have a problem.

Some nice mappings for the breakpoint window are useful on their own and could be implemented also independently.

Generally I understand that the requested feature is useful for vdebug and would say “PRs welcome”.

0reactions
Garethpcommented, Jul 3, 2019

Perhaps I’m missing something, but doesn’t the protocol already support this? The dbgp documentation for the attributes of a breakpoint has a property for a breakpoint called state, which can be set to enabled or disabled, so you’d just toggle the breakpoint using breakpoint_update.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enable, Disable, and Delete Breakpoints - T-SQL debugger
On the Debug menu, click Disable All Breakpoints. On the toolbar of the Breakpoints window, click the Disable All Breakpoints button. To Enable...
Read more >
Enabling and disabling breakpoints - eXERD
Enabling and disabling breakpoints ; Open the breakpoint's context menu and select Disable, or deselect the breakpoint's checkbox. The breakpoint image will ...
Read more >
Disabling and enabling a breakpoint (system ... - PTC Support
To disable a breakpoint: • Right-click the breakpoint's item, point to Breakpoints, and then deselect the Breakpoint Enabled, On Entry Breakpoint Enabled ......
Read more >
Disabling, Enabling, or Deleting a Breakpoint
To disable all breakpoints, select Breakpoint > Disable All Breakpoints. To enable a disabled breakpoint, click its breakpoint icon. The white  ...
Read more >
Enabling/Disabling and Deleting Breakpoints - Visual Micro
Enabling /Disabling a Breakpoint ... You can enable and disable breakpoints at any time without having to recompile/upload. ... ) and select "Disable...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found