Skip to content

Fixes #46509 - Added key binding to disable a single breakpoint - #46629

Merged
Isidor Nikolic (isidorn) merged 3 commits into
microsoft:masterfrom
marcobeltempo:issue46509
May 4, 2018
Merged

Isidor Nikolic (isidorn) merged 3 commits into
microsoft:masterfrom
marcobeltempo:issue46509

Conversation

@marcobeltempo

@marcobeltempo Marco Beltempo (marcobeltempo) commented Mar 27, 2018 •

Copy link
Copy Markdown
Contributor

Fixes #46509

This PR includes support to enable/disable a single breakpoint using the quick open menu or the Ctrl+Alt+D keyboard shortcut.

NOTE

  • This feature only enables/disables an active line with an enabled breakpoint

@msftclas

Microsoft Contribution License Agreements (msftclas) commented Mar 27, 2018 •

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

@isidorn

Copy link
Copy Markdown

Thanks for your PR, however currently we are wrapping up the milestone so I will only have time to review this next milestone -> April

@isidorn Isidor Nikolic (isidorn) added this to the April 2018 milestone Mar 27, 2018
@isidorn Isidor Nikolic (isidorn) added the debug Debug viewlet, configurations, breakpoints, adapter issues label Mar 27, 2018

@nzec Aditya Dutt (nzec) left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me!

@isidorn

Copy link
Copy Markdown

Marco Beltempo (@marcobeltempo) thanks for your pr. I left feedback directly in the code, any way not something we will take into for april, pushing out.

}
});

KeybindingsRegistry.registerCommandAndKeybindingRule({

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect this command to be toggle enablement. So if my breakpoint is enabled to disable it and the other way around.
That way it is more flexible. In order to change that the name and the id should be changed.

KeybindingsRegistry.registerCommandAndKeybindingRule({
id: 'debug.disableBreakpoint',
weight: KeybindingsRegistry.WEIGHT.workbenchContrib(),
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_D,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No default keybiinding please.

Comment thread src/vs/code/electron-main/menus.ts Outdated
const continueAction = this.createMenuItem(nls.localize({ key: 'miContinue', comment: ['&& denotes a mnemonic'] }, "&&Continue"), 'workbench.action.debug.continue');

const toggleBreakpoint = this.createMenuItem(nls.localize({ key: 'miToggleBreakpoint', comment: ['&& denotes a mnemonic'] }, "Toggle &&Breakpoint"), 'editor.debug.action.toggleBreakpoint');
const disableBreakpoint = this.createMenuItem(nls.localize({ key: 'miDisableBreakpoint', comment: ['&& denotes a mnemonic'] }, "Disable &&Breakpoint"), 'debug.disableBreakpoint');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not want this command in the debug menu, since it only works if there is a breakpoint on a line, and the debug menu is too global. So I would remove all this.

@marcobeltempo

Marco Beltempo (marcobeltempo) commented Apr 23, 2018 •

Copy link
Copy Markdown
Contributor Author

Isidor Nikolic (@isidorn) thank you for the feedback. I've made the requested changes.
The command can now enable/disable a single breakpoint when the user assigns a key binding.


vscode_enabledisablebreakpoint

@isidorn

Copy link
Copy Markdown

Thanks. This looks good, however this week we are in endgame week so we are focusing on testing.
Thus I wil lreview and merge this in next week

@isidorn
Isidor Nikolic (isidorn) merged commit 9a70d1c into microsoft:master May 4, 2018
@isidorn

Copy link
Copy Markdown

Marco Beltempo (@marcobeltempo) thank you for your PR, merging it in 🍻

@github-actions github-actions Bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

debug Debug viewlet, configurations, breakpoints, adapter issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disable breakpoint command

4 participants