Update: Microsoft will be moving away from UserVoice sites on a product-by-product basis throughout the 2021 calendar year. We will leverage 1st party solutions for customer feedback. Learn more here.


My feedback

  1. 24 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  Automation » Debugging and troubleshooting  ·  Flag idea as inappropriate…  ·  Admin →
    under review  ·  Beth Cooper responded

    Can you provide more detail on what you mean by useful? Do you want to know where in the code the error occurred? Can you provide an example of what you find useful for debugging PS in the ISE?

    You may want to try using ErrorRecord.InvocationInfo for non-terminating errors since on non-terminating errors, we currently save this data in the Error stream.

    On terminating errors (exceptions), this data is currently lost. But we can investigate storing this information to present it for debugging. I would like to make sure that this is the info that you are looking for though, so please confirm.

    As a workaround for now, you could write a global try/catch block in the runbook (which will also catch exceptions thrown because of $ErrorActionPreference = ‘Stop’) and write $_.ErrorRecord.InvocationInfo to a stream.

    Timothy shared this idea  · 
  2. 14 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Virtual Machines  ·  Flag idea as inappropriate…  ·  Admin →

    This is a very interesting idea and one I like a lot! Let me dig into whether this is something we could consider in the future. Thanks for the idea! :)

    Timothy supported this idea  · 

Feedback and Knowledge Base