How to debug Solidworks add-in with ATL COM dll interface

I am using Solidworks 2005 API to write Add-in for Solidworks. I am
using Visual C++. NET 2003 to write ATL Com-based add-in. Could anyone
please tell me how to debug the add-in efficiently? So far I have no
good way to debug. I could not find any useful information from the API
help files.
Any suggestions will be highly appreciated. Thank you!
Reply to
Loading thread data ...
for VB6 (no idea if this works in C++, but maybe you can figure something similar out): 1. add breakpoint to the code (F9), for example for the last line of SwAddin_ConnectToSW function 2. press F8 3. start SW 4. press F8 until you are at the end of the function 5. do what ever you need within SW, switch to VB and use F8 to run code line by line
this way gives you the normal error messages and you don't have to compile dll again and again just for testing..
Reply to
Markku Lehtola
Hi Markku,
Thanks a lot. I just figure out how to do in VC++, similar to what you decribed in VB. In VC, we can just start in debug mode, then VC will ask for the host program, browse to select solidworks; then we can load addin in solidworks; and the debug information is in VC IDE.
In VS.NET there is a VC++ utility called 'MFC-ATL Trace Tool', which I guess would be useful but I don't know how to make it useful.
Thank you!
Reply to

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.