-
Notifications
You must be signed in to change notification settings - Fork 522
Description
System Details
- Operating system name and version: Windows Server 2012 64 bit
- VS Code version: 1.15.0-insider
- PowerShell extension version: 1.4.1
- Output from
$PSVersionTable:
Name Value
PSVersion 4.0
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
CLRVersion 4.0.30319.42000
BuildVersion 6.3.9600.16406
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion 2.2
Copy / paste the below commands into the PowerShell Integrated Terminal, and paste the output here
code -v
code : The term 'code' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the pa
th is correct and try again.
At line:1 char:1
+ code -v
+ ~~~~
+ CategoryInfo : ObjectNotFound: (code:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS S:\Prod> $pseditor.EditorServicesVersion
Major Minor Build Revision
----- ----- ----- --------
1 4 1 0
PS S:\Prod> code --list-extensions --show-versions
code : The term 'code' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the pa
th is correct and try again.
At line:1 char:1
+ code --list-extensions --show-versions
+ ~~~~
+ CategoryInfo : ObjectNotFound: (code:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Issue Description
When running a script in debug mode, put a breakpoint somewhere in the script and hit F5, it's still possible to type text in the editor. In other words, adding or changing the code in the script is allowed while the script halted at a breakpoint.
This should not be possible as it outputs strange things. To reproduce, create the following script:
[CmdLetBinding()]
Param (
[String]$MyParam
)
Write-Verbose "Script started"
Get-Process | Select-Object Name
Write-Verbose "Debugging done"
Put a breakpoint on line 7 and hit F5:

At this point you can type something in the editor or just change Get-Process | Select-Object Name to Get-Process | Select-Object Name, ID. You will see that the debugger crashes the terminal and you are stuck with some text and no prompt:
The only workaround here is to close VS Code and restart it again. In PowerShell ISE the editor is correctly locked to avoid editing during debugging. This avoids issues like we experience now.
Log
