We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

VS17 : Attached to Archicad.exe and debugging is not working - SOLVED

Mihalcea Bogdan
Contributor
Hello! *Edit* I am using Archicad 24.
I have a problem debugging an add-on. The add-on works in Archicad very well after I followed every step to setup the environment required to develop Addons.
I attached Visual Studio 2017 to the Archciad.exe as it was mentioned in the documentation but the
DBPrintf("some string");
still not gives any output in the Output window.
Before you will redirect me to any other post I've already read this post https://archicad-talk.graphisoft.com/viewtopic.php?f=23&t=72673
I have my solution configured to "Native code", I enabled the "Attach to process" in the debug options.
Basically I made every step the documentation mentioned.
These are my #includes in the code

#include "APIEnvir.h"
#include "ACAPinc.h"

#include "ResourceIds.hpp"
#include "DGModule.hpp"
#include "APIdefs_Goodies.h"
#include "GSRoot.hpp"
#include <iostream>
Please help me amazing developers from Graphisoft
Thank you!
3 REPLIES 3
Mihalcea Bogdan
Contributor
So i think I found the answer!
2>ACAP_STATD.lib(ACAPlib.obj) : warning LNK4099: PDB 'API_c.pdb' was not found with 'ACAP_STATD.lib(ACAPlib.obj)' or at 'D:\TEMP\ARCHICAD ADDON TEMPLATE\archicad-addon-cmake-master_backup\Build\Debug\API_c.pdb'; linking object as if no debug info
2>AddOn.vcxproj -> D:\TEMP\ARCHICAD ADDON TEMPLATE\archicad-addon-cmake-master_backup\Build\Debug\ExampleAddOn.apx
2>Done building project "AddOn.vcxproj".
3>------ Skipped Build: Project: ALL_BUILD, Configuration: Debug x64 ------
3>Project not selected to build for this solution configuration
Mihalcea Bogdan
Contributor
This was not the answer. This is an error which can be ignored as some said on this forum. I updated archicad and it started to work just like that. I still got some errors from vs2017 about not found .pdb files related to Archicad’s main dll files.
Mihalcea Bogdan
Contributor
Viktor Kovacs mentioned in another post that in the Debugging menu -> Command should be set to Archicad.exe file location. Everything works now.