]> Git Repo - pico-vscode.git/blob - src/commands/debugLayout.mts
Add support for cmake-tools extension
[pico-vscode.git] / src / commands / debugLayout.mts
1 import { Command } from "./command.mjs";
2 import Logger from "../logger.mjs";
3 import { commands, workspace } from "vscode";
4
5 /**
6  * Relay command for toggling the debug layout (debug activity bar and debug repl).
7  */
8 export default class DebugLayoutCommand extends Command {
9   private _logger: Logger = new Logger("DebugLayoutCommand");
10
11   public static readonly id = "debugLayout";
12
13   constructor() {
14     super(DebugLayoutCommand.id);
15   }
16
17   async execute(): Promise<void> {
18     await commands.executeCommand("workbench.view.debug");
19
20     if (!(await workspace.getConfiguration().get("inDebugRepl"))) {
21       await commands.executeCommand("workbench.debug.action.toggleRepl");
22     }
23   }
24 }
This page took 0.021031 seconds and 4 git commands to generate.