PowerShell / PowerShell/vscode-powershell

debugging an external host should break at any statement

Open
#5,073 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Debugging Issue-Enhancement
Dominant language
TypeScript
Stars
1.9k
Forks
547
PR merge metrics
No merged PRs in 30d

Description

Prerequisites
  • I have written a descriptive issue title.
  • I have searched all issues to ensure it has not already been reported.
Summary

I have seen video's of vcode/powershell where when attaching to a host powershell process (running any script) using an attach configuration that script stops where it currently was executing.

This does not happen in the current powershell version (7.4.6). It also does not happen when doing the attach manually using enter-psHostProcess followed by debug-runspace. But it works when using debug-runspace -breakall.

I have seen that breakAll is new sinds powershell 7.2. I expect that in the powershell extension when using an attach configuration the old version "debug-runspace" is used and not the new version "debug-runspace -breakall".

Proposed Design

Can this be changed back to it was before powershell 7.2 (or configured in the launch configuration)?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing an attach configuration against a host PowerShell process on PowerShell 7.4.6, then compare it with Enter-PSHostProcess followed by Debug-Runspace and Debug-Runspace -BreakAll. The work is done when attaching can break at the currently executing statement, either by using -BreakAll or by providing the requested launch-configuration choice.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, typescript
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.