GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Need to be able to disable the debugger when the debugging is done after `ActionPreference.Break` is hit · Issue #10380 · PowerShell/PowerShell

Need to be able to disable the debugger when the debugging is done after ActionPreference.Break is hit #10380

New issue
Copy link
New issue
Copy link
Closed
Closed
Need to be able to disable the debugger when the debugging is done after ActionPreference.Break is hit#10380
Copy link
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreWG-Interactive-Debuggingdebugging PowerShell scriptdebugging PowerShell script

Description

@daxian-dbw
Dongbo Wang (daxian-dbw)
opened on Aug 19, 2019
Issue body actions

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.

Reacted by Kirk Munro

Activity

  1. Dongbo Wang (daxian-dbw)
    added
    Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a
    on Aug 19, 2019
  2. Ilya (iSazonov)
    added
    WG-Interactive-Debuggingdebugging PowerShell scriptdebugging PowerShell script
    on Aug 20, 2019
  3. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    microsoft-github-policy-serviceBot
    on Nov 16, 2023 – with Microsoft GitHub Policy Service
    Contributor
    More actions

    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.

  4. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    microsoft-github-policy-serviceBot
    on Nov 16, 2023 – with Microsoft GitHub Policy Service
    Contributor
    More actions

    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.

  5. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    microsoft-github-policy-serviceBot
    on Nov 16, 2023 – with Microsoft GitHub Policy Service
    Contributor
    More actions

    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.

  6. microsoft-github-policy-service
    added
    Resolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or more
    on Nov 16, 2023
  7. microsoft-github-policy-service commented on Nov 23, 2023

    @microsoft-github-policy-service
    microsoft-github-policy-serviceBot
    on Nov 23, 2023 – with Microsoft GitHub Policy Service
    Contributor
    More actions

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

  8. microsoft-github-policy-service
    closed this as completedon Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreWG-Interactive-Debuggingdebugging PowerShell scriptdebugging PowerShell script

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.