Skip to content

Commit

Permalink
Respect "showOutputView" setting when debugging (#507)
Browse files Browse the repository at this point in the history
* Fixup license

* Sort Chinese nls

* Recommend tyriar.sort-lines

* Document global.ts

* Add showOutputView to package.json

* Mark showOutputView todo

* Update ahk2

* Remove showOutputView.onError (wasn't working)

* Add translation

* Update to main

* Update changelog and manual test

* Respect `showOutputView` for debug as well (#70)
  • Loading branch information
mark-wiemer authored Sep 20, 2024
1 parent 7415656 commit 79f7577
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/common/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export enum ConfigKey {
indentCodeAfterLabel = 'v1.formatter.indentCodeAfterLabel',
maximumParseLength = 'v1.intellisense.maximumParseLength',
preserveIndent = 'v1.formatter.preserveIndent',
showOutputView = 'general.showOutputView',
templateSnippetNameV1 = 'v1.file.templateSnippetName',
templateSnippetNameV2 = 'v2.file.templateSnippetName',
trimExtraSpaces = 'v1.formatter.trimExtraSpaces',
Expand Down
7 changes: 5 additions & 2 deletions src/debugger/debugSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { DebugProtocol } from '@vscode/debugprotocol';
import { DebugDispatcher } from './debugDispatcher';
import { Continue } from './struct/command';
import { VscodeScope } from './struct/scope';
import { ConfigKey, Global } from '../common/global';

/**
* This interface describes the mock-debug specific launch attributes
Expand Down Expand Up @@ -60,8 +61,10 @@ export class DebugSession extends LoggingDebugSession {
})
.on('output', (text) => {
this.sendEvent(new OutputEvent(`${text}\n`));
// todo only focus on debug console view according to new config
commands.executeCommand('workbench.debug.action.focusRepl');
if (Global.getConfig(ConfigKey.showOutputView)) {
// focus on debug console view
commands.executeCommand('workbench.debug.action.focusRepl');
}
})
.on('end', () => {
this.sendEvent(new TerminatedEvent());
Expand Down

0 comments on commit 79f7577

Please sign in to comment.