You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Need to be able to disable the debugger when the debugging is done after ActionPreference.Break is hit #10380
This is an issue tracking the review comment of #8205 (comment), which should be fixed in the follow-up PR of #8205.
The PR #8205 introduces ActionPreference.Break, which will result breaking into the debugger (enable the debugger) when an action (e.g. ErrorAction) is hit.
-ErrorAction break will set the debugger mode to be Enabled, and after that the debugger mode will stay Enabled. That means once a ActionPreference.Break is hit, the session will never be able to run script in optimized mode anymore.
This feels like a concern to me. I can imagine one scenario where people uses -ErrorAction Break -- I don't expect an error will be thrown but want to debug in case the unexpected happens, but after debugging (quit the debugger prompt), I would like the rest of my scripts continue to run as efficient as it can (in optimized mode). That scenario will be compromised as the debugger mode will always be Enabled after the -ErrorAction Break is hit, and thus the Compiler will generated unoptimized code for the rest time of the session.
There should be a way to disable the debugger after ActionPreference.Break is hit and the debugging session is done.
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 commented on Nov 16, 2023
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 commented on Nov 16, 2023
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.
Activity
microsoft-github-policy-service commentedon Nov 16, 2023
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 commentedon Nov 16, 2023
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 commentedon Nov 16, 2023
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 commentedon Nov 23, 2023
This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes.