In this section:
You can use one of the following methods to run your program through Insure++ to perform runtime error detection on both instrumented and non-instrumented programs:
- Visual Studio IDE
- Insra GUI
- Command line
- Image File Execution options
By default, error messages are sent to Insra. Errors may be reported at both compile-time and run-time. For more information on using Insra, see Working with Results in Insra. For details on reported problems, see Error Codes.
You must have an executable file to run through Insure++. You can run instrumented programs or non-instrumented programs through Insure++. Instrumented programs will only execute if they are run under Inject, Insurespy, or Integrated Insurespy (a debugger embedded in Visual C++). See Adapting Usage to Different Environments and Needs for more information.
You cannot attach (for example, with the Insure++ debugger) to a running process using inject.exe/inject_x64.exe , InsureSpy.exe/InsureSpy_x64.exe, or the Integrated InsureSpy in Visual Studio. You must start all instrumented processes with these executables in Visual Studio.
From Visual Studio
You can run executables with Insure++ with or without the debugger.
Without the Debugger
Click the Insure++ Execute icon in the Insure++ toolbar to execute the current project with Insure++.
With the Debugger
Run the application through the debugger in the normal manner or click the Insure++ Debug button in the Insure++ toolbar to run applications that were built with Insure++.
Click the Insure++ Debug button in the Insure++ toolbar to run applications that were not built with Insure++.
If you attempt to execute or debug an out-of-date project in Visual Studio, you will typically be asked if you want to build first. Choosing Yes results in a normal build. If your project is out-of-date and you attempt to execute or debug by clicking Insure++ Debug or Insure++ Execute, clicking Yes when prompted will result in an instrumented build of your project.
By default, Insure++ is only invoked for non-instrumented executables when you click the Insure++ Debug button or when an application that has been instrumented with Insure++ runs through the Microsoft debugger. However, you can configure Insure++ to automatically run on any application that is run through the Visual Studio debugger--a process called Automatic InsureSpy Integrated Debugging--by performing the following steps:
Click the Insure++ Control Panel icon.
In the General tab and choose Automatic InsureSpy Integrated Debugging.
Once Insure++ is configured in this way, you can perform runtime error detection on non-instrumented applications through the Visual Studio IDE by pressing F5 or by clicking the Go icon in the Build toolbar.
For more information on working with debuggers, see Interacting with Debuggers.
From the Insra GUI
- Open the Insra GUI by clicking the Insra icon on the Insure++ toolbar or choose Start> Programs> Insure++> Insra.
- Choose File> Run and browse for the executable.
- Specify the command line and working directory (if your program requires them) and click OK. For more information on the Insra GUI, see Working with Results in Insra.
From the Command Line
InsureSpy <program.exe> to run instrumented Windows applications or type
Inject <program.exe> to run instrumented console applications.
Using Image File Execution Options
Use this method for applications that cannot be launched in any of the other ways, such as NT Services that start from the Service Control Manager or executables that must be launched as a child process of another executable.
- Open the Insure++ Control Panel by clicking the Insure++ Control Panel icon.
- Click the Advanced tab and enter the name only (not the full pathname) of the executable in the Executable field under Image File Execution Options.
- Choose insurespy.exe from the Debugger drop-down menu and click OK.
By default, error messages will be sent to Insra. See Adapting Usage to Different Environments and Needs for more information.