Debugging a Plugin
The following procedure helps you debug a HUD Optical Analysis plugin with Visual Studio.
To debug a plugin:
-
Open Visual Studio.
-
Load the source code of your plugin.
-
Set Visual Studio to Debug x64.
-
In the Build tab, click Build Solution to create the *.dll file.
-
Copy the *.dll file and its *.pdb file to C:\ProgramData\Ansys\v2XX\Optical Products\Plugins.
Note: The *.pdb file is used to link the debugger to the source code by Visual Studio to enable debugging.
-
Start Speos.
-
Load the project containing the HUD Optical Analysis (HOA).
-
In Visual Studio, click Debug, Attach to Process.
The Attach to Process window opens.
-
In Attach to, click Select.
The Select Code Type window opens.
-
Select Degug these code types and check Native.
-
Click OK.
-
In the Attach to Process window, select SpaceClaim.exe.
-
In Speos, run the HOA with the plugin to debug, and keep Visual Studio open at the same time.
You can now debug or modify your plugin while running a HOA.