Exception Hunter - 3.0
Learning Exception Hunter - 3.0
Examples using the command line
This topic provides some simple examples of how to use the command line interface.
Analyzing an assembly for exceptions
To detect the exceptions for all methods in the assembly WidgetAssembly.dll :
hunt /assembly:WidgetAssembly.dll
/all
If you do not specify the path to the assembly file, Exception Hunter assumes it is in the same folder as the Hunt.exe file. To specify an assembly in a different folder, enclose the full path in quotes:
hunt /assembly:"C:\MyProjects\WidgetProject\WidgetAssembly.dll"
/all
Note: If you do not specify either /all or at least one method using the /method argument, an error is returned.
Analyzing more than one assembly
To analyze more than one assembly, use separate /assembly arguments to specify each assembly:
hunt /assembly:"C:\MyProjects\WidgetProject\WidgetAssembly1.dll"
/assembly:"C:\MyProjects\WidgetProject\WidgetAssembly2.dll"
/assembly:"C:\MyProjects\WidgetProject\WidgetAssembly3.dll"
/all
Selecting specific methods to analyze
To specify particular methods to analyze, use the /method argument. Use a separate argument for each method:
hunt /assembly:"C:\MyProjects\WidgetProject\WidgetAssembly1.dll"
/method:System.Int32.ToString(String)
/method:System.Code.WidgetFunction()
You need to specify only enough of the name to make it unique.
Producing a report
By default the results of the analysis are output to the console.
Use the /xml switch to produce a results file containing the results as a set of xml data that you can translate into whatever format you require. You can also choose one of two HTML format reports:
/methodReportThe results are organized by method.
/exceptionReportThe results are organized by exception type.
Setting analysis options
Use the following switches to control how Exception Hunter analyzes your methods:
|
Analyzes assemblies against a specified version of the .NET Framework. For example, If a framework switch is not specified, .NET framework 2.0 is assumed. |
|
Does not search the GAC when analyzing assemblies. |
|
Sets the maximum depth of the stack that is used when displaying exceptions. Note that a value of 5 or greater may result in Exception Hunter taking a long time to complete its operation. |
|
Specifies the maximum number of virtual or interface overrides to follow. If the number of possible implementations of an object is greater than the number specified in this argument, Exception Hunter will ignore all exceptions thrown by this method. Some methods like GetHashCode() and interfaces like IComparer can be implemented by very many objects, so increasing the value of this option can results in much longer processing times. |
|
When this argument is specified, Exception Hunter does not attempt to eliminate code branches based on the possible values that have been evaluated for a variable. |
|
Uses a faster algorithm to analyze the code. Produces results more quickly but detects fewer exceptions. Typically, Exception Hunter detects fewer potential NullReferenceException and InvalidCastException exceptions but more exceptions that may never be thrown due to code logic, for example ArgumentNullException. |
|
Ignores calls to the ResourceManager and other apparently simple .NET library methods that call into many other parts of the library; using this switch can reduce the 'noise' of unexpected results and reduces the time required to complete the analysis. |
For a complete list of arguments and syntax for the command line, type:
hunt /? /v
See also |
Was this article helpful?
Exception Hunter
- Log files
- Type forwarding, .NET 4 and WPF support in Exception Hunter 3.0
- Viewing methods that throw a particular type of exception
- Creating an assembly for an ASP .NET 2.0 web application (version 1)
- Method analysis causing "application configuration is incorrect" errors
all products
- Some Red Gate products identified as containing a trojan by Anti-Virus software
- Activation may fail with Unknown Error -1
- Product uses web help although a CHM file is available locally
- Argument exception resulting from missing environment variable
- Check for updates may fail when used through proxies
- 'Unidentified Publisher' error when repairing or uninstalling
- Licensing activates product as standard edition
- Moving Red Gate software products to another machine
- Red Gate tools log locations
- The application UI opening slowly when there is no internet access
Exception Hunter
- Activating your products
- Activating your products
- Getting help offline
- Exception Hunter release notes - version 2.xx
- Exception Hunter release notes - version 3.xx
all products
- Red Gate product acknowledgements
- Activating your products
- Activating your products
- Red Gate bundle history
- Check for updates
- Troubleshooting Check for Updates errors
- Current versions
- Deactivating your products
- Installing Red Gate products from the .msi file
- Requesting additional activations
- Serial numbers for bundles
- Reactivating using a different serial number
- Extending your trial
- Finding your serial numbers
- Moving a serial number from one computer to another
- No response received for manual activation
- Licensing and activation resources
- Licensing and activation resources
- Troubleshooting licensing and activation errors
- Licensing and activation FAQs
- Red Gate tools log file locations
- Download old versions of products
- Download product prerequisites & utilities
- Support & upgrades
- Upgrading your software
- Upgrading FAQs

Using Exception Hunter