Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rkeithhill opened this issue Feb 4, 2016 · 10 comments
Closed

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

rkeithhill opened this issue Feb 4, 2016 · 10 comments
Labels
Issue-Enhancement A feature request (enhancement).
Milestone

Comments

@rkeithhill
Copy link
Contributor

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.

@rkeithhill rkeithhill added Issue-Discussion Let's talk about it. question labels Feb 4, 2016
@daviwil
Copy link
Contributor

daviwil commented Feb 4, 2016

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 :)

@daviwil daviwil added this to the 0.4.0 milestone Feb 4, 2016
@daviwil daviwil added the Issue-Enhancement A feature request (enhancement). label Feb 4, 2016
@dfinke
Copy link
Contributor

dfinke commented Feb 4, 2016

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

@daviwil
Copy link
Contributor

daviwil commented Feb 4, 2016

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.

@rkeithhill
Copy link
Contributor Author

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.

@daviwil
Copy link
Contributor

daviwil commented Feb 4, 2016

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

@dfinke
Copy link
Contributor

dfinke commented Feb 4, 2016

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

@daviwil
Copy link
Contributor

daviwil commented Feb 4, 2016

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.

@rkeithhill
Copy link
Contributor Author

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

@daviwil
Copy link
Contributor

daviwil commented Feb 4, 2016

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.

@rkeithhill
Copy link
Contributor Author

Sounds good.

@daviwil daviwil removed Issue-Discussion Let's talk about it. question labels Feb 5, 2016
@daviwil daviwil changed the title Is the DBG prompt in the debug console output useful? Reduce prompt noise when stopping at breakpoints in the debugger Feb 5, 2016
daviwil added a commit that referenced this issue Feb 5, 2016
This change keeps the debug adapter from printing the prompt until the
user enters a command.  This will allow breakpoints to be hit without the
prompt being shown every time.  The change also trims the ending '>'
character off of the end of the prompt to reduce user confusion about
where commands should be typed.
@daviwil daviwil closed this as completed in bf485ff Feb 5, 2016
TylerLeonhardt pushed a commit to TylerLeonhardt/PowerShellEditorServices that referenced this issue Feb 26, 2019
…port

Add support for loading host profile scripts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Enhancement A feature request (enhancement).
Projects
None yet
Development

No branches or pull requests

3 participants