Debugging a Plugin

The following procedure helps you debug a HUD Optical Analysis plugin with Visual Studio.

To debug a plugin:

  1. Open Visual Studio.
  2. Load the source code of your plugin.
  3. Set Visual Studio to Debug x64.
  4. In the Build tab, click Build Solution to create the *.dll file.
  5. 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.
  6. Start Speos.
  7. Load the project containing the HUD Optical Analysis (HOA).
  8. In Visual Studio, click Debug, Attach to Process.
    The Attach to Process window opens.
  9. In Attach to, click Select.
    The Select Code Type window opens.
  10. Select Degug these code types and check Native.
  11. Click OK.
  12. In the Attach to Process window, select SpaceClaim.exe.
  13. 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.