Skip to content

Commit

Permalink
No code changes, format with prettier.
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-bloomerang committed Dec 27, 2020
1 parent 6d22c15 commit a112558
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 49 deletions.
24 changes: 11 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,16 @@
"main": "./out/extension.js",
"contributes": {
"configuration": {
"title": "Debug Controls In Titlebar",
"properties": {
"debugControlsInTitlebar.hideDebugStart": {
"type": "boolean",
"default": false,
"description": "Hides the Debug Start Icon."
"title": "Debug Controls In Titlebar",
"properties": {
"debugControlsInTitlebar.hideDebugStart": {
"type": "boolean",
"default": false,
"description": "Hides the Debug Start Icon."
}
}
}
},
"commands": [
{
"commands": [{
"command": "debug-in-titlebar.debug-restart",
"title": "Restart Debug",
"icon": "$(debug-restart)",
Expand Down Expand Up @@ -101,8 +100,7 @@
}
],
"menus": {
"editor/title": [
{
"editor/title": [{
"command": "debug-in-titlebar.debug-start",
"group": "navigation@1999901",
"when": "debuggersAvailable && !config.debugControlsInTitlebar.hideDebugStart && !inDebugMode || debugState == 'initializing'"
Expand All @@ -122,7 +120,7 @@
"command": "debug-in-titlebar.debug-stepOver",
"group": "navigation@1999903",
"when": "debuggersAvailable && inDebugMode"

},
{
"command": "debug-in-titlebar.debug-stepInto",
Expand Down Expand Up @@ -177,4 +175,4 @@
"type": "git",
"url": "https://github.com/EverlastEngineering/debugInTitlebar.git"
}
}
}
112 changes: 76 additions & 36 deletions src/extension.ts
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() { }

0 comments on commit a112558

Please sign in to comment.