Debugging a PCL module

jmurphy

Well-known member
I have made some progress... I can now build the windows C++ code, link and create the dll. I can install it in PixInsight and run it. :)
Is it also possible to run the dll in the Visual Studio debugger?
These are my current settings, but so far it's not hitting my breakpoints:
1625255348923.png

The main change I made was setting the Command to the PixInsight.exe

Thanks, John Murphy
 
Hi @jmurphy,

I used to do it long time ago but, in general, it should be possible to attach to any process and put breakpoints into dlls that have been built with the proper debug symbols. I remember I had similar issues due to the fact that the process were not loading exactly the dll I expected (like a release version or another old copy of it) , to check which dll was loaded at runtime I remember I used program Dependency Walker.

It's useful to identify both the static dll dependencies and the dlls loaded at runtime, maybe this could help.

Robyx
 
You should build the module with the debug configuration provided in the project file generated by MakefileGenerator. This ensures that the -pxm.dll file contains debug information. Then you must start a new debug session by running the PixInsight.exe core executable, which should load your module with debug information. Note that your module can be anywhere on your filesystem, so it doesn't have to be located on the bin distribution folder (which is a system-protected folder that should never be modified).

Let me know if this helps.
 
Back
Top