Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from May 4, 2018

Conversation

marcobeltempo
Copy link
Contributor

@marcobeltempo marcobeltempo commented Mar 27, 2018

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
Copy link

msftclas commented Mar 27, 2018

CLA assistant check
All CLA requirements met.

@isidorn
Copy link
Contributor

isidorn commented Mar 27, 2018

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 isidorn added this to the April 2018 milestone Mar 27, 2018
@isidorn isidorn added the debug Debug viewlet, configurations, breakpoints, adapter issues label Mar 27, 2018
Copy link

@nzec nzec left a comment

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
Contributor

isidorn commented Apr 20, 2018

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

@isidorn isidorn modified the milestones: April 2018, On Deck Apr 20, 2018
@@ -44,6 +44,29 @@ export function registerCommands(): void {
}
});

KeybindingsRegistry.registerCommandAndKeybindingRule({
Copy link
Contributor

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
Contributor

Choose a reason for hiding this comment

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

No default keybiinding please.

@@ -850,6 +850,7 @@ export class CodeMenu {
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
Contributor

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
Copy link
Contributor Author

marcobeltempo commented Apr 23, 2018

@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 isidorn modified the milestones: On Deck, May 2018 Apr 24, 2018
@isidorn
Copy link
Contributor

isidorn commented Apr 24, 2018

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 isidorn merged commit 9a70d1c into microsoft:master May 4, 2018
@isidorn
Copy link
Contributor

isidorn commented May 4, 2018

@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