Skip to content

Reduce prompt noise when stopping at breakpoints in the debugger #130

Closed

Description

@rkeithhill

Every time I hit a breakpoint, I see the DBG prompt in the debug console:

[DBG]: PS C:\Users\Keith\GitHub\rkeithhill\PowerShellEditorServices\src\PowerShellEditorServices.Host\bin\Debug> 

This sort of gives the impression I can type after the > which I can't. It also clutters up the output. My question is - do we need this prompt text spit out to the console at every breakpoint and debug console command execution?

I guess seeing what path I'm currently at is useful but I'm not sure I need to see that over and over. :-) Also the PS in the prompt doesn't really add much value and the > is downright misleading.

Now if you could modify the prompt text in the input textbox area of the DEBUG console - that could be cool.

Activity

  1. daviwil commented on Feb 4, 2016

    @daviwil
    Contributor

    In this case I was mimicing the behavior of the ISE when breakpoints are hit. However, I can see the value of not writing the debug prompt initially when the breakpoint is hit but only after the user executes a command in the REPL. That way it'd remove the noise if you're just stepping through a bunch of breakpoints.

    I think the prompt is helpful in the case where you're typing commands, especially when navigating around directories. At some point I'm going to file a feedback request to get rid of the input box in the REPL window so that you can type after the actual prompt text in the buffer. I'm not sure whether they'll actually do it, though :)

  2. added this to the 0.4.0 milestone on Feb 4, 2016
  3. added
    Issue-Enhancement
    on Feb 4, 2016
  4. dfinke commented on Feb 4, 2016

    @dfinke
    Contributor

    Yup, I saw that, and I kept typing there to see if I could get any information.

  5. daviwil commented on Feb 4, 2016

    @daviwil
    Contributor

    Do you think that it's confusing enough that it should be removed entirely? I feel like the console experience is going to be pretty weird without a prompt.

  6. rkeithhill commented on Feb 4, 2016

    @rkeithhill
    ContributorAuthor

    not writing the debug prompt initially when the breakpoint is hit but only after the user executes a command in the REPL

    I like that better. I guess we could do like ISE and emit a line like this at breakpoints:

    Hit Line breakpoint on 'C:\Users\Keith\PowerShellSupport\VariableScopes.ps1:9'
    

    But I'm not sure that adds much value either. The editor is pretty good about switching to the correct file and line when a breakpoint is hit. And when you do write the prompt, I'd remove the > at the end to eliminate any possible confusion. This is a read-only prompt.

  7. daviwil commented on Feb 4, 2016

    @daviwil
    Contributor

    Yeah, I'll remove the > at the end, that should help minimize confusion.

  8. dfinke commented on Feb 4, 2016

    @dfinke
    Contributor

    Don't know if this makes sense. Adding [Read Only] would make it explicit

  9. daviwil commented on Feb 4, 2016

    @daviwil
    Contributor

    I think [Read Only] may be even more confusing, they might think they can't type commands at all. At any rate, the confusion factor of anything shouldn't be a blocker since I except people will try to enter commands anyway and realize how it works. Hopefully in the future we'll get the ability to let the user type in the REPL window after the prompt so that this won't be a problem anymore.

  10. rkeithhill commented on Feb 4, 2016

    @rkeithhill
    ContributorAuthor

    With the change to only display the "prompt" when a command is executed at the debug console, I view this as less of a prompt and more of a "marker" between script output and commands I execute during debugging. To that end, perhaps we should emit the DBG line before and after execution of a command at the debug console prompt e.g.:

    script output1
    script output2
    
    [DBG]: PS C:\Users\Keith\GitHub\rkeithhill\PowerShellEditorServices\src\PowerShellEditorServices.Host\bin\Debug
    get-date
    
    Thursday, February 4, 2016 9:43:12 AM
    
    
    [DBG]: PS C:\Users\Keith\GitHub\rkeithhill\PowerShellEditorServices\src\PowerShellEditorServices.Host\bin\Debug
    
    script output3
    script output4
    
  11. daviwil commented on Feb 4, 2016

    @daviwil
    Contributor

    It might be hard to do the before/after because if the user enters multiple commands without continuing from the breakpoint then they'll get duplicated prompt strings on the subsequent commands, something like this:

    script output1
    script output2
    
    [DBG]: PS C:\Users\Keith\GitHub\rkeithhill\PowerShellEditorServices\src\PowerShellEditorServices.Host\bin\Debug
    get-date
    
    Thursday, February 4, 2016 9:43:12 AM
    
    
    [DBG]: PS C:\Users\Keith\GitHub\rkeithhill\PowerShellEditorServices\src\PowerShellEditorServices.Host\bin\Debug
    
    [DBG]: PS C:\Users\Keith\GitHub\rkeithhill\PowerShellEditorServices\src\PowerShellEditorServices.Host\bin\Debug
    get-date
    
    Thursday, February 4, 2016 9:43:12 AM
    
    
    [DBG]: PS C:\Users\Keith\GitHub\rkeithhill\PowerShellEditorServices\src\PowerShellEditorServices.Host\bin\Debug
    
    script output3
    script output4
    

    Showing the prompt only after a command executes is probably enough for now. I'll go with that and see what kind of feedback we get. If people think it's confusing we'll be able to tweak the output for the next release.

  12. rkeithhill commented on Feb 4, 2016

    @rkeithhill
    ContributorAuthor

    Sounds good.

  13. changed the title [-]Is the DBG prompt in the debug console output useful?[/-] [+]Reduce prompt noise when stopping at breakpoints in the debugger[/+] on Feb 5, 2016
  14. added 2 commits that reference this issue on Feb 5, 2016
    2a3fa0b
    bf485ff
  15. added a commit that references this issue on Feb 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions