Skip to content

Option to hide Debug Console after debugging session is stopped #82931

Closed

Description

@johannes-do

IMHO the default behavior of the debug console should be as follows:

  1. If the console was open before the session was started, it should also stay open after debugging session was ended
  2. If the console was closed, the console should open during debugging session and hide again once the users stops the debugging session
  3. For maximum flexibility, the user should have an option in the config file to force either to always hide or always leave the console open after the debugging session was stoped.

The current behavior keeps the console open after debugging which is super annoying as it takes up valuable screen space and I find myself hitting that close button after every single debugging session...

Activity

  1. vscodebot commented on Oct 20, 2019

    @vscodebot

    (Experimental duplicate detection)
    Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

  2. V-ed commented on Oct 20, 2019

    @V-ed
    Contributor

    commented 17 minutes ago

    I was literally searching for that exact same issue! I found #3829, but it was closed and reverted as it may be useful to keep it open sometimes.

    I would also like the behavior as described here (maybe keeping how it is currently as the default, and make the configurable option have a "Retain previous view" as an option).

  3. johannes-do commented on Oct 20, 2019

    @johannes-do
    Author

    Yeah, I also found that but it was quite quickly reverted back to the current behaviour because of this issue: #4203.
    Glad someone else has the same need and regardless of the default behavior, I would also be happy with an option as described by Guillaume Marcoux (@V-ed).

  4. V-ed commented on Oct 20, 2019

    @V-ed
    Contributor

    Interestingly, even Dirk Bäumer (@dbaeumer) thinks (at least, in the comment transcribed below) that it should autoclose if it was opened programmatically :

    In general I think debug/run should only close the debug console if the console got open programmatically beforehand through a launch.

    Thanks j-o-d-o for pointing out #4203!

  5. isidorn commented on Oct 21, 2019

    @isidorn

    Thanks for the feature request.
    I agree with the initial comment and I agree that we can improve. However we need to better define what to do for Debug: Start Without Debugging. Since the default should not be that it opens and closes after 1 second. So I think Debug: Start Without debugging should by default not close it.

    Once we agree on the desired behavior I would also be open to a PR to fix this. Thus adding help-wanted.
    Code pointer

    fyi Andre Weinand (@weinand) roblourens on potential feedback

  6. added
    debug
    feature-request
    help wanted
    on Oct 21, 2019
  7. V-ed commented on Oct 21, 2019

    @V-ed
    Contributor

    However we need to better define what to do for Debug: Start Without Debugging.

    Is this a new feature? How is that linked to the feature request here? Personally, I would like the described feature request here to be applied to the regular debugging experience, not only in a "debug-less" mode, as even when debugging, when I'm finished (so when the debugger is detached, for example), the console would close if it was opened by the debugger itself. EDIT : I didn't realize there was an option to run a task without the debugger, but like it was said below, they shouldn't be different (although what I strikedout kinda reflected this...) as they are both tasks.

    Since the default should not be that it opens and closes after 1 second.

    If the program runs in 1 second and stops, and an option would be set to close the debugger window on stop, then it should stop no? This is an interesting case, maybe there could be some sort of minimum runtime to be able to close the debug console automatically, say less than 5 seconds?

    So I think Debug: Start Without debugging should by default not close it.

    (again, I'm confused by what "Debug: Start Without debugging" is in this context...), but I do believe that the current behavior of not closing up automatically should be kept, as many probably are accustomed to and use the output to further debug their app, even when the debug stopped, but a new option should be added (as described here) to close it automatically if wanted.

    Just to add another point on the table, I feel like this should be a user setting AND a launch task overrideable value, as different task may require the debug console, and others don't. Therefore, a user could setup so his personal taste (setting) is "close" by default, but override it per task to allow greater flexibility.

  8. johannes-do commented on Oct 22, 2019

    @johannes-do
    Author

    The request here would mean to implement a new setting, flag or similar which I definitely would consider a "feature request".
    Imho starting to set timers and doing stuff based on that would be confusing for the user and overly complicated.

    Isidor Nikolic (@isidorn) regarding the Start with and without debugging. Currently, I am seeing the same behavior: The debug console gets programmatically opened if I press f5 or ctrl+f5 and then stays open if I close the session (shift + f5).
    In my opinion, we don't need to distinguish between the two and should use the same setting and behavior for both modes as they essentially do very similar things: running a task.

    I would say the simplest solution would be to have an option such as: "consoleOnSessionEnd": "keepOpen" | "originalState" | "close". With keepOpen being the default as it is the current behavior.

  9. roblourens commented on Oct 24, 2019

    @roblourens
    Member

    Sounds good to me Isidor Nikolic (@isidorn), I think we can add a setting to enable closing it or matching the original state, but it should stay open by default to avoid confusing users who can't find their program output, especially when their program is fast.

  10. changed the title [-]Option to hide Debug Console after debugging session is stoped[/-] [+]Option to hide Debug Console after debugging session is stopped[/+] on Oct 24, 2019
  11. added
    verification-needed
    on Dec 23, 2019
  12. isidorn commented on Dec 23, 2019

    @isidorn

    To verify make sure the following setting works as expected for all values
    debug.console.closeOnEnd

  13. isidorn commented on Dec 23, 2019

    @isidorn

    For simplicity decided to go with just a boolean. I do not see a user needing the fine grained distinction between ifOpenedByDebug and always
    This way it also matches the current setting openExplorerOnEnd

  14. connor4312 commented on Jan 28, 2020

    @connor4312
    Member

    Verified this works as expected but it feels kind of odd to me. The experience I would want (and probably enable if it was a setting) would be a "go back to previous state" setting. So if I had the terminal open before I started, go back there. If it was closed, close it. If I had the debug console open, do nothing. Personally I almost always have the bottom panel open and would probably never want it to close, but a 'back' action would be neat.

    This would also be a very nice interaction with the new debug terminal--you could type commands in the terminal, enter debug mode, and get swapped back to the terminal as soon as the process exits.

  15. isidorn commented on Jan 29, 2020

    @isidorn

    Connor Peet (@connor4312) agree 100%. I feel like we will have to dump this setting in the future, thus it might have been smarter not to have it all. But now that it is done it is not the end of the world...

  16. V-ed commented on Jan 29, 2020

    @V-ed
    Contributor

    I feel like we will have to dump this setting in the future

    Isidor Nikolic (@isidorn) I certainly feel like this setting should be kept but the original PR intention should have been kept, in other words, the whenOpenedByDebug should not have been removed.

    I understand that trying to be coherent with already existing settings / for simplicity is very interesting since it gives the settings less complexity overall, but I don't think having this setting as an enum is such an issue. Maybe another setting in that case? I feel like another setting would be too much though.

    but it should stay open by default to avoid confusing users who can't find their program output, especially when their program is fast

    As Rob said in his comment, the default should be to stay open. Why would you want to remove the setting? To remove this feature, or to change the default?

  17. added
    on-release-notes
    on Jan 31, 2020
  18. locked and limited conversation to collaborators on Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

debugfeature-requesthelp wantedon-release-notesverification-neededverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions