Repository navigation
Closed
Labels
Description
Issue Description
Take the following script, stored at C:\private_sba\PowerShell\TestPowerShellDebuggerBehaviorWithPrompt.ps1:
Write-Host("WH1")
Write-Host("WH2")
Write-Host("WH3")
If you run this via F5 in the Windows PowerShell ISE you get:
PS ~> C:\private_sba\PowerShell\TestPowerShellDebuggerBehaviorWithPrompt.ps1
WH1
WH2
WH3
But if you do the same in VScode, you get:
PS ~/PowerShell/work> WH1private_sba\PowerShell\TestPowerShellDebuggerBehaviorWithPrompt.ps1
WH2
WH3
if you're using the "PowerShell Launch Current File" configuration, and
PS ~/PowerShell/work> c:\private_sba\PowerShell\TestPowerShellDebuggerBehaviorWithPrompt.ps1
WH1
WH2
WH3
if you're using the "PowerShell Launch Current File w/Args Prompt" configuration.
Expected Behaviour
The script's output should be displayed after / below the prompt + name of script being debugged.
Actual Behaviour
The script's output is intermingled with the prompt / name of the script being debugged.
Attached Logs
System Details
System Details Output
### VSCode version: 1.33.0 0dd516dd412d42323fc3464531b1c715d51c4c1a x64
### VSCode extensions:
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
### PSES version: 2.0.0.0
### PowerShell version:
Name Value
---- -----
PSVersion 5.1.17134.590
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17134.590
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Activity
PrzemyslawKlys commentedon Apr 10, 2019
Are you using PSReadLine? #1727
sba923 commentedon Apr 10, 2019
Yes I am. Debugging a PowerShell script under VScode when you have no history at the [DBG] prompt is pretty impossible if you ask me ;-)
See also #1850
PrzemyslawKlys commentedon Apr 10, 2019
Yes, thats why I disabled PSReadline.
SydneyhSmith commentedon Apr 10, 2019
Thanks for opening Stéphane BARIZIEN (@sba923)
sba923 commentedon Apr 10, 2019
Przemysław Kłys (@PrzemyslawKlys): you got me wrong; I meant that one cannot (decently) debug under VScode without PSReadline
PrzemyslawKlys commentedon Apr 10, 2019
I see, well I am not that experienced in debugging. I am pressing F5, stop and check what's there and try again, and again :-)
sba923 commentedon Apr 10, 2019
Sure, but when you're at the [DBG] prompt, you typically want to look at multiple things one after another, so you need up/down arrow command history to run the same commands (e.g. to evaluate an expression) over and over again!
PrzemyslawKlys commentedon Apr 10, 2019
Right now, when I touch any code while in debug (like trying to fix code when stopped VSCode crashes). Not sure why I would need to evaluate expression over and over but it may be I'm just too weak :-)
SydneyhSmith commentedon Jan 30, 2020
Marking as fixed as the PR for this has been merged...should be available in the next update