How to Debug a .NET Addin effectively under Visual Studio 2010
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Actually I start to develop my Inventor Addins under Visual Basic 2010 Professional for 64 bit Inventor, because there is no way around to go further with Visual Basic 6.
So i started up with Visual Studio 2010 Professional at a Windows 7 Ultimate x64 operating system, to realize first that there is no possibility to make any changes on your source on x64 operating systems.
Then i installed everything new on Windows 7 x86 and start to develop there first and recompile it later for the x64 system.
I thought after nearly 10 years of .NET development it will not be a problem to to easily debug my addin.
In Visual Studio 6 it was no problem to change your source code when an error occur, and go further with debugging from the pause-mode by pressing "F5" key (Run Button).
For bigger changes i was able to unload the Addin only in Inventor and stop the debugger in Visual Studio 6. To go further with debugging i need only to press the "F5" key again and reload the Addin in Inventor. For loading and unloading the addin i wrote a VBA macro and attached it to a toolbar button.
So i needed to switch between debugging and editing about 5 seconds in Visual Basic 6.
Now with .NET i try to attach the debugger to the running Inventor and i use the old macro afterwards to load and unload the Addin in Inventor like before. At the end i stop the debugger and go further with editing. Until that point everything works fine.
After i have done my changes in the soucre, i need to recompile the Addin to get a new symbol (pdb) file for the further debugging. But this is not possible because Inventor is still hold handles on the "dll" and the "pdb" file. Only when i quit Inventor i am able to get access to these files again.
But start and quit Inventor is exactly not that what i like to do to start and stop debugging, because that cost me 5 minutes instead of 5 seconds on every small error i find in my source.
Is there a effective way to switch between debug and edit mode without loading and unloading the whole Inventor?
Many thanks for any suggestions.
Norbert Schmitz