Skip to content

Hide Debug Console After Session Has Stopped - #83249

Merged
Isidor Nikolic (isidorn) merged 21 commits into
microsoft:masterfrom
ChayimFriedman2:issue-#82931
Dec 23, 2019
Merged

Isidor Nikolic (isidorn) merged 21 commits into
microsoft:masterfrom
ChayimFriedman2:issue-#82931

Conversation

@ChayimFriedman2

Copy link
Copy Markdown
Contributor

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.

@msftclas

Microsoft Contribution License Agreements (msftclas) commented Oct 24, 2019 •

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

@isidorn Isidor Nikolic (isidorn) added the debug Debug viewlet, configurations, breakpoints, adapter issues label Oct 25, 2019
@isidorn

Copy link
Copy Markdown

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 string, not a boolean.

Aslo the setting should be called debug.console.closeOnEnd
Please polish up this PR and I can review it a second time once I am back from vacation in 2 weeks

fyi Andre Weinand (@weinand)

@isidorn

Copy link
Copy Markdown

PIng me when this is ready for review. Thank you

@ChayimFriedman2

Copy link
Copy Markdown
Contributor Author

Isidor Nikolic (@isidorn) This is ready for review.

@weinand

Copy link
Copy Markdown
Contributor

Chayim Refael Friedman (@ChayimFriedman2) Isi will be back in the office next week.

@isidorn

Copy link
Copy Markdown

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': {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be called replWasOpened

}

const closeConsoleOnEnd = this.configurationService.getValue<IDebugConfiguration>('debug').closeConsoleOnEnd;
if (closeConsoleOnEnd === 'always' || (closeConsoleOnEnd === 'whenOpenedByDebug' && !this.internalTerminalWasOpened)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the newline change here?

@isidorn

Copy link
Copy Markdown

Sorry for the slow response, I was on vacation.
I have reviewed this PR and added comments inline. Thanks

@ChayimFriedman2

Copy link
Copy Markdown
Contributor Author

Ready for review again.

@ChayimFriedman2

Copy link
Copy Markdown
Contributor Author

Isidor Nikolic (@isidorn) Fixed.

@isidorn

Copy link
Copy Markdown

Thank you very much for this PR, merging in.

@isidorn
Isidor Nikolic (isidorn) merged commit 204c8ec into microsoft:master Dec 23, 2019
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

debug Debug viewlet, configurations, breakpoints, adapter issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Option to hide Debug Console after debugging session is stopped

5 participants