Skip to content

Commit

Permalink
Fix vscode debug terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
Electroid committed Aug 31, 2023
1 parent 10c8013 commit bd7262f
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions packages/bun-vscode/src/features/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,6 @@ export default function (context: vscode.ExtensionContext, factory?: vscode.Debu
vscode.debug.registerDebugAdapterDescriptorFactory("bun", factory ?? new InlineDebugAdapterFactory()),
vscode.window.registerTerminalProfileProvider("bun", new TerminalProfileProvider()),
);

const document = getActiveDocument();
if (isJavaScript(document?.languageId)) {
vscode.workspace.findFiles("bun.lockb", "node_modules", 1).then(files => {
const { terminalProfile } = new TerminalDebugSession();
const { options } = terminalProfile;
const terminal = vscode.window.createTerminal(options);

const focus = files.length > 0;
if (focus) {
terminal.show();
}

context.subscriptions.push(terminal);
});
}
}

function RunFileCommand(resource?: vscode.Uri): void {
Expand Down Expand Up @@ -196,11 +180,6 @@ class TerminalDebugSession extends FileDebugSession {
iconPath: new vscode.ThemeIcon("debug-console"),
});
}

dispose(): void {
super.dispose();
this.signal.close();
}
}

function getActiveDocument(): vscode.TextDocument | undefined {
Expand Down

0 comments on commit bd7262f

Please sign in to comment.