SDK:Debugging SDK Plugins: Difference between revisions
Line 44: | Line 44: | ||
=== Setup the new Debug Config === | === Setup the new Debug Config === | ||
Edit the Debug configuration to make it debug-like as it is based on Release because of the way we created it. | |||
#Disable Optimization in C/C++ -> Optimizations pane. | |||
# |
Revision as of 18:06, 15 November 2017
.SDK|SDK ..SDK:Types|SDK Types ..SDK:Using the SDK|Using the SDK ..VCOM:VCOM (Vectorworks Component Object Model)|VCOM Basics ..VCOM:Class Reference|VCOM Class Reference
The Problem
After the Unicode conversion (Vectorworks 2018), there are some issues (crashing) with the debugging SDK plugins with Vectorworks. Unicode details at SDK:Vectorworks 2018 Unicode
This is Windows ONLY problem!
The problem is the fact that the SDK uses STL for the SDK:TXString representation.
On Windows, the STL is compiled differently between Debug and Release configurations. So, when a plugin is compiled in Debug configuration, it cannot run with the Release Vectorworks. In fact, it will cause Vectorworks to crash!
The Solution
The solution is to change the Debug configuration so it would build like-release, but still support debugging so the plugin code can be stepped through and variables monitored.
Again, this is Windows ONLY problem with VisualStudio
There are three steps in fixing this for your projects:
Delete Debug Config
The existing Debug configuration is not needed. You should delete it in the Configuration Manager.
- Right click on your project and select properties.
- Then click on the 'Configuration Manager...' button
- In the active solution configurations popup, select '<Edit>'
- In the new dialog, you can select Debug and hit the 'Remove Button'
Create a new Debug Config
Create a new Debug configuration that is based on the Release configuration.
- Right click on your project and select properties.
- Then click on the 'Configuration Manager...' button
- In the active solution configurations popup, select '<New>'
- Enter 'Debug' as name
- And choose 'Release' to copy the settings from
Setup the new Debug Config
Edit the Debug configuration to make it debug-like as it is based on Release because of the way we created it.
- Disable Optimization in C/C++ -> Optimizations pane.