Copy link to clipboard
Copied
Hello,
For almost 2 years, we have been testing and debugging our PLNs in their release versions, as we could not get the debug versions to build/link, and it was still possible to run in the VS2019 debugger with breakpoints etc...
Now, we have some quiet time, and I deceided to try to get the debug version of the PLN to build and finally managed to et the debug version of my PLN to build and link.
But, when I try to use the "normal" version of InDesign to load my debug PLN, nothing happens.
Do I need to also install the DEBUG version of InDesign (yuk!) ?
Very best regards,
Olivier
Copy link to clipboard
Copied
Yes, it seems that only the debug version of inDesign can be used with a plugin compiled in DEBUG mode 😞
Copy link to clipboard
Copied
I don't know what a PLN is in this context...
If you set the debug flag on the production version, does that help? You may also want to reach out to wwds@adobe.com with this question.
Copy link to clipboard
Copied
Sorry, too much jargon.
PLN is the Windows file extension for InDesign plugins.
I have bitten the bullet and installed the debug version of InDesign.
Thank you for your assistance.
Very best regards,
Olivier
Copy link to clipboard
Copied
Olivier, please mind the subtle differences.
Since several decades a plug-in is a binary executable library (Windows: dll, OSX: framework) produced from C++ sources.
The term plugin is an unfortunate marketing choice for something formerly known as extension, implemented in a high level scripting language such as Flex/ActionScript, CEP / Javascript or the forthcoming UXP.
Setting a debug flag is a concept of the latter - it disables security checks for the convenience of the developer.
Debug builds of plug-ins have different binary code matching differences in the debug build of the application. As you found, they are incompatible with the release build and fortunately the application checks for that.
The differences would be larger object sizes to support extended (slow) runtime checks, additional object methods, entire interface omitted or unfunctional in the release builds - for example services to turn numeric IDs into readable strings, or support various debug output sinks. The plug-ins also should contain extra code in macros that are optimized away by the compiler for the release build. Therefor these debug plug-ins can't run with a release build.
Copy link to clipboard
Copied
Thanks, Dirk!
Copy link to clipboard
Copied
It may seem incredible and strange, but i can debug the Plug-In produced with xcode for the release verison of indesign.
I attached xcode to InDesign 2019, I activated the Debug executable checkbox, and strangely I can debug my Plug-In using a version release of InDesign, how is this possible?
What's even weirder is that I wanted to do the exact same thing with later versions of InDesign like 2020,2021 and so on, but with none of these I was able to debug the release version of InDesign.
The reason i keep wanting to debug the release version of InDesign is for the simple reason that it is much faster, the debug version of indesign is infinitely slower.
I apologize in advance if I have confused some terminology.
Copy link to clipboard
Copied
Hi @Stefano5C37,
You can debug your plugin with release version of InDesign as well that is not strange. You just need to generate the debug symbols while compiling the release build of your plugin and you should be able to debug it. The reason we use debug version of InDesign is that it comes with additional support for debugging, like enhanced run time checks, asserts for possible issues in your code etc. So the price you pay in terms of slowness of debug build is compensated with these additional support.
-Manan
Copy link to clipboard
Copied
Could you tell me what I have to pay attention when I want to debug the release version?
Because the only thing I did was simply activate this checkbox, but unfortunately the only time I was able to debug with the release version was with an imac (intel) using indesign 2019 and I only succeeded with that version with all the others no, because it gave me the same error that it gives me now on mac Studio.
I doubt that the problem is the pc I use, I'm probably ignoring something that's doesn't allow the correct functioning, but I don't know what.
I leave these two screenshots for you to understand better the possible problem.
Stefano
Copy link to clipboard
Copied
Hey @Manan Joshi,
I've created a post for this question, if you want to answer me you can do it here.
Sorry to bother you.
Stefano