Nebeor Posted October 6, 2020 Share Posted October 6, 2020 Hello everybody, I am planning to migrate my plugins to Vectorworks 2021 However, when I try to run on debug, the loading screen of Vectorworks halts on the SDK code somewhere down in the destructor of the TXString. (this happens with my own code, just as with the sample project). I can see this is due to the _ITERATOR_DEBUG_LEVEL, I think it tries to warn me about something, but I don't see how this connects with my code...because I don't see any in my stacktrace. Iterating over the code with a breakpoint didn't helped me either... It crashed after exiting ModuleMain... When I build with Release: most of the things works, but in order to fix the things that are broken, I need the debugger. I am looking forward to your answers! Quote Link to comment
Nicolas Goutte Posted October 8, 2020 Share Posted October 8, 2020 (edited) On Windows, you cannot use the Debug mode, as on Windows the C(++) runtime for Debug and Release differ, but VW is available for us (third party developers) only as Release mode. See what I had written months ago: Edited October 8, 2020 by Nicolas Goutte 1 Quote Link to comment
Nebeor Posted October 19, 2020 Author Share Posted October 19, 2020 Thank you for you reply, Does this mean that the workaround on http://developer.vectorworks.net/index.php/SDK:Debugging_SDK_Plugins will eventually work? If not, I don't see the point of this tutorial. I just want to be able to use breakpoints and watches, nothing fancy like "Edit and Continue" which i've never used with Vectorworks before. Right now, I managed to make a copy from the "release" config work as "debug", but i am still not able to connect with the debugger. Quote Link to comment
Nicolas Goutte Posted October 19, 2020 Share Posted October 19, 2020 Yes you can use the Fake-Debug trick. As long as the C++ code is not optimized, the breakpoints should work correctly and be at the right place. 1 Quote Link to comment
Richard1 Posted January 12, 2021 Share Posted January 12, 2021 (edited) In order to connect a debugger to a Release build under MSVC there are two important settings for building your plugin: C/C++ > General > "Debug Information Format: Program Database (/Zi)" (C7 compatible also works, but is larger) Linker > Debugging > "Generate Debug Info: Generate Debug Information (/DEBUG)" The "PDB" file this generates is your key to debugging, keep each version safe as you will need the correct one to debug each individual build. By default they'll be alongside your VW plugin, with the extension "PDB". (There is ident information inside each PDB so windbg and visual studio know which is right. Google MSVC Symbol Server for nice ways to store multiple versions) You do not need to disable optimisations, however doing so can make single-stepping more predictable - clearly you can't step into code that has been optimised away! However, any stack backtraces that enter Vectorworks code not covered by the PDBs in the SDK (eg walking your callstack backwards from a breakpoint or from crashes in the field) are likely to be very wrong as x64 stackwalking requires PDB information. (This wasn't true of MSVC x86 code) Vectorworks don't appear to have published PDBs for the main application, which is a shame. It would be nice if they would do so - though it would have to be a "stripped" version of course so as not to expose any of their private proprietary information. Edited January 12, 2021 by Richard1 Quote Link to comment
Nebeor Posted August 18, 2021 Author Share Posted August 18, 2021 (edited) I would like to to see the debug assert messages on runtime, just like in VW2015, but that seems to be more complicated to achieve. Edited August 18, 2021 by Nebeor Quote Link to comment
Nicolas Goutte Posted August 23, 2021 Share Posted August 23, 2021 On 8/18/2021 at 3:11 PM, Nebeor said: I would like to to see the debug assert messages on runtime, just like in VW2015, but that seems to be more complicated to achieve. We (the interiorcad team) sorted this out by making our own assert-Macro, controlled by our own #define. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.