Skip to content

Hide Debug Console After Session Has Stopped#83249

Merged
isidorn merged 21 commits intomicrosoft:masterfrom
ChayimFriedman2:issue-#82931
Dec 23, 2019
Merged

Hide Debug Console After Session Has Stopped#83249
isidorn merged 21 commits intomicrosoft:masterfrom
ChayimFriedman2:issue-#82931

Conversation

@ChayimFriedman2
Copy link
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
Copy link

msftclas commented Oct 24, 2019

CLA assistant check
All CLA requirements met.

@isidorn isidorn added the debug Debug viewlet, configurations, breakpoints, adapter issues label Oct 25, 2019
@isidorn
Copy link
Collaborator

isidorn commented Oct 25, 2019

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 @weinand

@ChayimFriedman2 ChayimFriedman2 deleted the issue-#82931 branch October 25, 2019 10:50
@ChayimFriedman2 ChayimFriedman2 restored the issue-#82931 branch October 25, 2019 11:03
@isidorn
Copy link
Collaborator

isidorn commented Oct 25, 2019

PIng me when this is ready for review. Thank you

@ChayimFriedman2
Copy link
Contributor Author

@isidorn This is ready for review.

@weinand
Copy link
Contributor

weinand commented Nov 7, 2019

@ChayimFriedman2 Isi will be back in the office next week.

@isidorn
Copy link
Collaborator

isidorn commented Nov 11, 2019

Thanks. I am back from vacation and plan to review this some time this week.

@isidorn isidorn added this to the November 2019 milestone Nov 11, 2019
default: 'onFirstSessionStart'
},
'debug.internalConsoleOptions': INTERNAL_CONSOLE_OPTIONS_SCHEMA,
'debug.closeConsoleOnEnd': {
Copy link
Collaborator

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
Collaborator

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
Collaborator

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
Collaborator

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
Collaborator

isidorn commented Nov 20, 2019

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

@isidorn isidorn modified the milestones: November 2019, Backlog Nov 20, 2019
@ChayimFriedman2
Copy link
Contributor Author

Ready for review again.

@ChayimFriedman2
Copy link
Contributor Author

@isidorn Fixed.

@isidorn
Copy link
Collaborator

isidorn commented Dec 23, 2019

Thank you very much for this PR, merging in.

@isidorn isidorn merged commit 204c8ec into microsoft:master Dec 23, 2019
@isidorn isidorn modified the milestones: Backlog, January 2020 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