Debug-Error

1.0.1

Enables breaking into the debugger on terminating errors automatically. The
script works in any host with a debugger, in the console it breaks into the
debugger, too. But troubleshooting is not that easy as in VS Code.

VS Code scenario. Let the PowerShell extension start and open its terminal.
For example, open a script. In the terminal invoke Debug-Error.ps1. Then
i
Enables breaking into the debugger on terminating errors automatically. The
script works in any host with a debugger, in the console it breaks into the
debugger, too. But troubleshooting is not that easy as in VS Code.

VS Code scenario. Let the PowerShell extension start and open its terminal.
For example, open a script. In the terminal invoke Debug-Error.ps1. Then
invoke a script. As a result, on errors VS Code breaks into the debugger
and opens the culprit script in the editor at the line with an error.

Without parameters this command enables debugging on failures globally.
Use the parameter Script in order to narrow the location of errors.
Use the switch Off in order to stop debugging on errors.

The command exploits updates of the variable StackTrace on terminating
errors. Setting this variable breakpoint enables debugging on failures.

Show more

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Script -Name Debug-Error

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(c) Roman Kuzmin

Package Details

Author(s)

  • Roman Kuzmin

Tags

Debug Test

Dependencies

This script has no dependencies.

FileList

Version History

Version Downloads Last updated
1.0.1 (current version) 619 5/20/2017
1.0.0 74 5/19/2017