Skip to main content
 

Automatic crash reporting using FogBugz for PowerShell

This morning I integrated our PowerShell processes into FogBugz by writing a small module that submits occurrences of all errors to BugzScout. You might want to do something similar so I did this write-up.

Broadly it works similar to BugzScoutLogWriter that I developed previously for integration with SilverStripe CMS. In this case however, we need to do the following things:

  1. Set the script to stop on all errors so they can be trapped instead of ending the execution of the script.
  2. Capture the error details and submit them to FogBugz
  3. Have an error occur. ;)

I've published the code in a Gist for you a have a look. I include the function in every script I use.