8000 [Regression] Difference in behavior when using Debug-Runspace from Windows PowerShell and PowerShell 7 · Issue #13567 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content
8000

[Regression] Difference in behavior when using Debug-Runspace from Windows PowerShell and PowerShell 7 #13567

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
TylerLeonhardt opened this issue Sep 3, 2020 · 5 comments
Labels
Issue-Bug Issue has been identified as a bug in the product Resolution-No Activity Issue has had no activity for 6 months or more WG-Interactive-Debugging debugging PowerShell script

Comments

@TylerLeonhardt
Copy link
Member

Steps to reproduce

Open 2 PowerShell windows of the same version

create a file foo.ps1 that looks like this:

"hello"
Start-Sleep -Seconds 20
"boo"

In PowerShell one

PS > $pid | scb

In PowerShell two

PS > Enter-PSHostProcess -Id <PASTE>

In PowerShell one

PS > . .\foo.ps1

Hurry up and run In PowerShell two:

[Process: 2345] PS > Debug-Runspace 1

Expected behavior

This happens in Windows PowerShell

Debugging Runspace: Runspace1
To end the debugging session type the 'Detach' command at the debugger prompt, or type 'Ctrl+C' otherwise.

At C:\Users\tyleonha\Downloads\foo.ps1:3 char:1
+ "boo"
+ ~~~~~
[DBG]: [Process:30956]: [Runspace1]: PS C:\Users\tyleonha\Downloads>>

Actual behavior

This happens in PowerShell 7. Note it does not break into a debug prompt.

Debugging Runspace: Runspace1
To end the debugging session type the 'Detach' command at the debugger prompt, or type 'Ctrl+C' otherwise.


Command or script completed.
To end the debugging session type the 'Detach' command at the debugger prompt, or type 'Ctrl+C' otherwise.

Thoughts

Frankly I'm suspicious of my own PR way back when #11312 that changed this behavior. This parameter -BreakAll mentioned here:
#13527

should probably be -NoBreakAll or have some way to have it on by default and allow you to opt out. This will allow for backcompat for Windows PowerShell and the ability to toggle BreakAll.

Environment data

Name                           Value
----                           -----
GitCommitId                    7.1.0-daily.20200430
PSVersion                      7.1.0-daily.20200430
WSManStackVersion              3.0
Platform                       Unix
SerializationVersion           1.1.0.1
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
OS                             Darwin 19.6.0 Darwin Kernel Version 19.6.0: Thu Jun 18 20:49:00 PDT 2020; root:xnu-6153.141.1~1/RELEASE_X86_64
PSRemotingProtocolVersion      2.3
PSEdition                      Core

Although this bug existed in 7.0...

@TylerLeonhardt TylerLeonhardt added the Issue-Question ideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a label Sep 3, 2020
@SteveL-MSFT SteveL-MSFT added Issue-Bug Issue has been identified as a bug in the product and removed Issue-Question ideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a labels Sep 3, 2020
@SteveL-MSFT SteveL-MSFT added this to the 7.1-Consider milestone Sep 3, 2020
@iSazonov iSazonov added the WG-Interactive-Debugging debugging PowerShell script label Sep 3, 2020
@TravisEz13 TravisEz13 modified the milestones: 7.1-Consider, 7.2-Consider Nov 11, 2020
@SteveL-MSFT SteveL-MSFT modified the milestones: 7.2-Consider, 7.3-Consider Dec 7, 2020
@SteveL-MSFT SteveL-MSFT modified the milestones: 7.3-Consider, 7.2-Consider Jan 5, 2021
@ili101
Copy link
ili101 commented Feb 15, 2021

So this is why all the 5 guides I found on how to debug runspaces didn't work for me.
As this is a regression bug shouldn't it have higher priority?

Copy link
Contributor

This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

2 similar comments
Copy link
Contributor

This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

Copy link
Contributor

This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

@microsoft-github-policy-service microsoft-github-policy-service bot added Resolution-No Activity Issue has had no activity for 6 months or more labels Nov 16, 2023
Copy link
Contributor

This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug Issue has been identified as a bug in the product Resolution-No Activity Issue has had no activity for 6 months or more WG-Interactive-Debugging debugging PowerShell script
Projects
None yet
Development

No branches or pull requests

5 participants
0