Different Preview Behavior for debugging
See original GitHub issueIssue Description
I am experiencing a problem with… debugging. I set a breakpoint as I would normally do. The code stops.

I see what I want to see - I press SHIFT+F5 to stop PowerShell and fix the issues.
In production the code is stopped, and nothing more is happening. In Preview the data that is currently in place seems to flow to terminal.
Normally you should be able to reproduce it with something similar to:
for ($i = 0; $i -lt 10; $i++) {
'test'
}
After it hits breakpoint, when you do Shift + F5 it will throw everything else into the

But while working on this easy to use example I seem to hit #2175 issue all the time. After I run the code, nothing happens (F5 stops working). And after I restart PowerShell

And can’t run any code either. I have to close VSCode to be able to work again… however finally I was able to run different code, and again try to build a working example:
$Testor = for ($i = 0; $i -lt 10; $i++) {
$Tes2 = for ($i = 0; $i -lt 10; $i++) {
'test'
}
$Tes2
'test'
}
$Testor

It will display all tests from Tes2.
But I can pretty much catch #2175 90% of the time using:
for ($i = 0; $i -lt 10; $i++) {
'test'
}
Sorry for mixing up two problems, but it just came while I was trying to reproduce so maybe related.
Attached Logs
Follow the instructions in the README about capturing and sending logs.
Environment Information
Visual Studio Code
| Name | Version |
|---|---|
| Operating System | Windows_NT x64 10.0.17763 |
| VSCode | 1.39.2 |
| PowerShell Extension Version | 2019.11.1 |
PowerShell Information
| Name | Value |
|---|---|
| PSVersion | 5.1.17763.771 |
| PSEdition | Desktop |
| PSCompatibleVersions | 1.0 2.0 3.0 4.0 5.0 5.1.17763.771 |
| BuildVersion | 10.0.17763.771 |
| CLRVersion | 4.0.30319.42000 |
| WSManStackVersion | 3.0 |
| PSRemotingProtocolVersion | 2.3 |
| SerializationVersion | 1.1.0.1 |
Visual Studio Code Extensions
Visual Studio Code Extensions(Click to Expand)
| Extension | Author | Version |
|---|---|---|
| beautify | HookyQR | 1.5.0 |
| gitlens | eamodio | 10.1.2 |
| material-icon-theme | PKief | 3.9.1 |
| open-in-browser | techer | 2.0.0 |
| powershell-preview | ms-vscode | 2019.11.1 |
| theme-monokai-pro-vscode | monokai | 1.1.14 |
| vscode-tldr | bmuskalla | 1.0.0 |
| vscode-wakatime | WakaTime | 2.2.1 |
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)

Top Related StackOverflow Question
Yes, it no longer acts like that. So I closed it.
That makes sense to me