Hide Debug Console After Session Has Stopped#83249
Hide Debug Console After Session Has Stopped#83249isidorn merged 21 commits intomicrosoft:masterfrom ChayimFriedman2:issue-#82931
Conversation
|
Thanks for the PR. However as @j-o-d-o already mentioned by default the current behavior should not change. Also as exlpained in the first comment this should setting should have 3 states. Thus it needs to be a Aslo the setting should be called fyi @weinand |
|
PIng me when this is ready for review. Thank you |
|
@isidorn This is ready for review. |
|
@ChayimFriedman2 Isi will be back in the office next week. |
|
Thanks. I am back from vacation and plan to review this some time this week. |
| default: 'onFirstSessionStart' | ||
| }, | ||
| 'debug.internalConsoleOptions': INTERNAL_CONSOLE_OPTIONS_SCHEMA, | ||
| 'debug.closeConsoleOnEnd': { |
There was a problem hiding this comment.
The setting should be called debug.console.closeOnEnd.
Also the descriptpon needs to be updated, it is wrong
| private previousState: State | undefined; | ||
| private initCancellationToken: CancellationTokenSource | undefined; | ||
|
|
||
| private internalTerminalWasOpened = false; |
There was a problem hiding this comment.
This should be called replWasOpened
| } | ||
|
|
||
| const closeConsoleOnEnd = this.configurationService.getValue<IDebugConfiguration>('debug').closeConsoleOnEnd; | ||
| if (closeConsoleOnEnd === 'always' || (closeConsoleOnEnd === 'whenOpenedByDebug' && !this.internalTerminalWasOpened)) { |
There was a problem hiding this comment.
You shouold check if the activePanel is the debug console, you can not just close any panel. Since the user might have opened a terminal for example
| const fullPath = path.join(cwd, command); | ||
| return await exists(fullPath) ? fullPath : undefined; | ||
| } No newline at end of file | ||
| } |
There was a problem hiding this comment.
Why the newline change here?
|
Sorry for the slow response, I was on vacation. |
|
Ready for review again. |
|
@isidorn Fixed. |
|
Thank you very much for this PR, merging in. |
This PR fixes #82931
Added a setting (default is true), which when set to true and the debug console was opened because of a debug session closes it after the session stops.