Archicad C++ API
About Archicad add-on development using the C++ API.

[newbie] how to attach a debugger to ArchiCAD-Addons?

Anonymous
Not applicable
Hi!

I am using Visual Studio to create ArchiCAD-Addons an I am looking for a way to use the debugger of Visual Studio for stepping through the addon-code at runtime.

Has anyone a hint how to do so?
I am new to archicad-addon-programming and only created a minimal addon which shows a "hello World" message box after being launched.

I have programmed plugins for Gimp and was able to attach the debugger to the process of the Plugin so that i was able to debug the code but i was not able to do so with a ArchiCAD-addon.

I dont like using "printf"-debug-infos and really hope that someone has a hint how to use a real debugger for ArchiCAD-Addons.

Or does anyone has recommendations how to debug addons?

regards

John
4 REPLIES 4
Anonymous
Not applicable
I know there is a tool to view strings printed by the method "OutputDebugString": http://www.sysinternals.com/utilities/debugview.html

But I still hope some one has a hint how to use a real debugger.
Oleg
Expert
You need to load compiled version your addon in the archicad's addon manager ( do not copy it but load where it is located after compilation ).
Set path of your archicad.exe as executable for debug session.
It is:
- On the Debug Tab of the Project Settings for Visual Studio 6
- On Debugging panel, Command field of the project properties for Visual Studio NET
( or set it empty. Use browse to point the archiacd.exe when you will be asked at Debug start )

After that you can use usual Debug Start (Go) for debugging. Archicad will start.
Set breakpoint etc.
Anonymous
Not applicable

Thats great!
Thank you very much!!!
Anonymous
Not applicable
Thank Oleg