vscode-powershell icon indicating copy to clipboard operation
vscode-powershell copied to clipboard

Debugger operations should print out the action that was taken in Integrated Terminal

Open pcgeek86 opened this issue 8 years ago • 8 comments

System Details

  • Operating system name and version:
  • VS Code version:
  • PowerShell extension version:
  • Output from $PSVersionTable:
Copy / paste the below commands into the PowerShell Integrated Terminal, and paste the output here

PS C:\> code -v
1.10.2
8076a19fdcab7e1fc1707952d652f0bb6c6db331
PS C:\> $pseditor.EditorServicesVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
0      12     0      0

PS C:\> code --list-extensions --show-versions
[email protected]

PS C:\> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.14393.693
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.693
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Issue Description

When stepping through the debugger, a new line is printed in the Integrated Terminal each time a debugger action is taken (eg. Step Into, Step Out, etc.), showing the PowerShell prompt. This could be improved to be more useful by showing the debugger action that was taken each time a new line is printed, instead of showing just the prompt by itself.

Low priority.

Cheers, Trevor Sullivan

pcgeek86 avatar Apr 05 '17 14:04 pcgeek86

Good idea!

daviwil avatar Apr 05 '17 16:04 daviwil

@pcgeek86 Are you sure about this? I'm already finding it a bit annoying that my output is scattered all over the place in the integrate console e.g.: image Why can't the output be like this: image I don't see much value is seeing a bunch of lines that say step over, step over, step into, step, ... ? And why are getting a blank line spit out to the integrated console whenever we step over a line that generates no output? OK, now you all can come back on my lawn. :-)

BTW I don't mind seeing a line that tells me why the output stopped (hit breakpoint) but that's about the limit for me.

rkeithhill avatar Apr 06 '17 01:04 rkeithhill

@rkeithhill are you stepping through the script? What's your prompt function? It should be writing out your prompt each time the debugger stops:

image

My prompt returns a > so that's why it looks like this.

daviwil avatar Apr 06 '17 01:04 daviwil

There is an error in my prompt function at the moment. I'm using my branch of an ANSI-ized posh-git and I introduced an error the other night that I need to fix. However, in the regular console, if the prompt function errors out, it supplies a simple PS> prompt. Maybe we should do something similar here. Either > or PS>.

rkeithhill avatar Apr 06 '17 02:04 rkeithhill

OK, actually the problem was I switched to a branch that used an incompatible GitPromptSetting. Anyway, this is better (I think). Might need to rethink by DBG prompt - make it a single line: image

rkeithhill avatar Apr 06 '17 02:04 rkeithhill

It used to do that but I think I broke it when I changed how I gather the prompt. I'll try to fix that for 0.13.0.

daviwil avatar Apr 06 '17 02:04 daviwil

Here's what I'm seeing when kicking off debugger commands. One line per debugger task, but only the prompt is shown. It would be more useful to actually see the individual debugger tasks that were invoked (think Get-History, but for the debugger interface).

screen shot 2017-04-06 at 10 57 54 am

pcgeek86 avatar Apr 06 '17 17:04 pcgeek86

Well, just so we all know, this still repros 😅

andyleejordan avatar Apr 12 '22 23:04 andyleejordan