Skip to content

Different Preview Behavior for debugging #2289

@PrzemyslawKlys

Description

@PrzemyslawKlys

Issue Description

I am experiencing a problem with... debugging. I set a breakpoint as I would normally do. The code stops.

image

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

image

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

image

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

image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions