-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
No code changes, format with prettier.
- Loading branch information
1 parent
6d22c15
commit a112558
Showing
2 changed files
with
87 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,83 @@ | ||
import * as vscode from 'vscode'; | ||
import * as vscode from "vscode"; | ||
var breakpointtoggle = true; | ||
export function activate(context: vscode.ExtensionContext) { | ||
// idea: hide the debug/toolbar ? | ||
|
||
let debugRestart = vscode.commands.registerCommand(`debug-in-titlebar.debug-restart`, () => { | ||
vscode.commands.executeCommand('workbench.action.debug.restart'); | ||
}); | ||
let debugPause = vscode.commands.registerCommand(`debug-in-titlebar.debug-pause`, () => { | ||
vscode.commands.executeCommand('workbench.action.debug.pause'); | ||
}); | ||
let debugStart = vscode.commands.registerCommand(`debug-in-titlebar.debug-start`, () => { | ||
vscode.commands.executeCommand('workbench.action.debug.start'); | ||
}); | ||
let debugStop = vscode.commands.registerCommand(`debug-in-titlebar.debug-stop`, () => { | ||
vscode.commands.executeCommand('workbench.action.debug.stop'); | ||
}); | ||
let debugContinue = vscode.commands.registerCommand(`debug-in-titlebar.debug-continue`, () => { | ||
vscode.commands.executeCommand('workbench.action.debug.continue'); | ||
}); | ||
let debugStepInto = vscode.commands.registerCommand(`debug-in-titlebar.debug-stepInto`, () => { | ||
vscode.commands.executeCommand('workbench.action.debug.stepInto'); | ||
}); | ||
let debugStepOut = vscode.commands.registerCommand(`debug-in-titlebar.debug-stepOut`, () => { | ||
vscode.commands.executeCommand('workbench.action.debug.stepOut'); | ||
}); | ||
let debugStepOver = vscode.commands.registerCommand(`debug-in-titlebar.debug-stepOver`, () => { | ||
vscode.commands.executeCommand('workbench.action.debug.stepOver'); | ||
}); | ||
let debugToggleBreakPoints = vscode.commands.registerCommand(`debug-in-titlebar.debug-toggleBreakpoints`, () => { | ||
if (!breakpointtoggle) { | ||
vscode.commands.executeCommand('workbench.debug.viewlet.action.enableAllBreakpoints'); | ||
} | ||
else { | ||
vscode.commands.executeCommand('workbench.debug.viewlet.action.disableAllBreakpoints'); | ||
} | ||
breakpointtoggle = !breakpointtoggle; | ||
}); | ||
let debugRestart = vscode.commands.registerCommand( | ||
`debug-in-titlebar.debug-restart`, | ||
() => { | ||
vscode.commands.executeCommand("workbench.action.debug.restart"); | ||
} | ||
); | ||
let debugPause = vscode.commands.registerCommand( | ||
`debug-in-titlebar.debug-pause`, | ||
() => { | ||
vscode.commands.executeCommand("workbench.action.debug.pause"); | ||
} | ||
); | ||
let debugStart = vscode.commands.registerCommand( | ||
`debug-in-titlebar.debug-start`, | ||
() => { | ||
vscode.commands.executeCommand("workbench.action.debug.start"); | ||
} | ||
); | ||
let debugStop = vscode.commands.registerCommand( | ||
`debug-in-titlebar.debug-stop`, | ||
() => { | ||
vscode.commands.executeCommand("workbench.action.debug.stop"); | ||
} | ||
); | ||
let debugContinue = vscode.commands.registerCommand( | ||
`debug-in-titlebar.debug-continue`, | ||
() => { | ||
vscode.commands.executeCommand("workbench.action.debug.continue"); | ||
} | ||
); | ||
let debugStepInto = vscode.commands.registerCommand( | ||
`debug-in-titlebar.debug-stepInto`, | ||
() => { | ||
vscode.commands.executeCommand("workbench.action.debug.stepInto"); | ||
} | ||
); | ||
let debugStepOut = vscode.commands.registerCommand( | ||
`debug-in-titlebar.debug-stepOut`, | ||
() => { | ||
vscode.commands.executeCommand("workbench.action.debug.stepOut"); | ||
} | ||
); | ||
let debugStepOver = vscode.commands.registerCommand( | ||
`debug-in-titlebar.debug-stepOver`, | ||
() => { | ||
vscode.commands.executeCommand("workbench.action.debug.stepOver"); | ||
} | ||
); | ||
let debugToggleBreakPoints = vscode.commands.registerCommand( | ||
`debug-in-titlebar.debug-toggleBreakpoints`, | ||
() => { | ||
if (!breakpointtoggle) { | ||
vscode.commands.executeCommand( | ||
"workbench.debug.viewlet.action.enableAllBreakpoints" | ||
); | ||
} else { | ||
vscode.commands.executeCommand( | ||
"workbench.debug.viewlet.action.disableAllBreakpoints" | ||
); | ||
} | ||
breakpointtoggle = !breakpointtoggle; | ||
} | ||
); | ||
|
||
context.subscriptions.push(debugRestart,debugStart,debugStop,debugContinue,debugStepInto,debugStepOut,debugStepOver,debugPause,debugToggleBreakPoints); | ||
context.subscriptions.push( | ||
debugRestart, | ||
debugStart, | ||
debugStop, | ||
debugContinue, | ||
debugStepInto, | ||
debugStepOut, | ||
debugStepOver, | ||
debugPause, | ||
debugToggleBreakPoints | ||
); | ||
} | ||
|
||
export function deactivate() {} | ||
export function deactivate() { } |