Skip to content

Powershell debugger hangs stepping over a script invocation #2742

Closed
@johndog

Description

@johndog

Issue Type: Bug

  1. Open a script with the following contents
Set-StrictMode -Version 5
$ErrorActionPreference = "Stop"
. $PSScriptRoot\test2.ps1
"hello 3"
  1. In test2.ps1, put literally anything (e.g. "hello from test2.ps1", or even blank or non-existant).
  2. Put a breakpoint on line 3 (test2.ps1 invocation)
  3. Hit F5
  4. When it breaks hit F10

Result: debugger will never return. You have to stop it and restart the integrated powershell instance.

Note: If either of the first two lines are commented out, i.e. without either Set-StrictMode OR $EAP = "Stop", it seems to work The combination causes fits.

Note 2: If there are no breakpoints, it seems to work then as well.

Extension version: 2020.4.0
VS Code version: Code 1.45.1 (5763d909d5f12fe19f215cbfdd29a91c0fa9208a, 2020-05-14T08:27:35.169Z)
OS version: Windows_NT x64 10.0.19635

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz (12 x 3696)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.78GB (15.85GB free)
Process Argv --folder-uri file:///c%3A/repos/devdir
Screen Reader no
VM 0%

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions