Skip to content
Tom Bogle edited this page Aug 11, 2021 · 1 revision

To use Visual Studio to debug a plugin you have created, do the following:

  • Make sure that you have copied the .pdb files along with their corresponding .ptxplg file(s) and any other .dll files you wish to debug. This is explained in detail in Building a Plugin.
  • In your plugin solution, add an existing project. For the type of file, choose Exe Project files (*.exe). Navigate to where Paratext is installed and select it.
  • For conveniences, set the Paratext project as the startup project for your solution.
  • If you set the ParatextInstallDir environment variable, you can edit the properties of the project to use %ParatextInstallDir% instead of the absolute path. (This is helpful if you need to switch between multiple Paratext install or development locations.)
  • After starting Paratext in the debugger, if you see a message saying that your breakpoint(s) will not be hit because no symbols have been loaded, on the Properties page for the Paratext EXE project, change the Debugger type to the appropriate type for your plugins. For example, Managed .NET (4.x). (For a reason that we have not yet determined, the default setting of Auto works for some development environments but not for others.)

*Debugging Hint: Look in the Debug Output window to see where DLLs are being loaded. Paratext should load DLLs for a plugin from the folder where the plugin is located unless it has already loaded that same DLL with the same major and minor version. In the unlikely event that a plugin requires a specific build of a DLL that has the same major and minor version as one that Paratext uses, it will need to rebuilt with a different major or minor version or with a different string name.

Clone this wiki locally