You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reduce prompt noise when stopping at breakpoints in the debugger #130
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.
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 :)
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.
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.
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.
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.:
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.
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
Activity
daviwil commentedon 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 :)
dfinke commentedon Feb 4, 2016
Yup, I saw that, and I kept typing there to see if I could get any information.
daviwil commentedon 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 commentedon Feb 4, 2016
I like that better. I guess we could do like ISE and emit a line like this at breakpoints:
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 aread-onlyprompt.daviwil commentedon Feb 4, 2016
Yeah, I'll remove the
>at the end, that should help minimize confusion.dfinke commentedon Feb 4, 2016
Don't know if this makes sense. Adding [Read Only] would make it explicit
daviwil commentedon 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 commentedon Feb 4, 2016
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.:
daviwil commentedon 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:
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 commentedon Feb 4, 2016
Sounds good.
[-]Is the DBG prompt in the debug console output useful?[/-][+]Reduce prompt noise when stopping at breakpoints in the debugger[/+]Fix #130: Reduce prompt noise in debug adapter
Fix #130: Reduce prompt noise in debug adapter
Merge pull request PowerShell#130 from PowerShell/daviwil/profile-sup…