2021-04-1508:49 AM - last edited on 2021-09-1412:40 AM by Noemi Balogh
I am trying to get output from the Debug Monitor in VS 2017 and C++ within Windows 10. There does not appear to be any detailed instructions as to how to do this other than attach Archicad to the debugger in VS. I have done this and still can not get any output from the DB functions in the VS output pane. The attachment in VS appears to be correct as I am getting the initial output in the output debug pane.
The documentation states :"start the Debug Monitor application while/before ARCHICAD is running" Where is this??
Is there anything I need to do within Archicad to start the process? I did download the Debug Monitor zip file and unzipped it as mentioned in the Blog. Because of the lack of details in the API documentation and API Blogs, I assume the process is very simple and obvious. But for some reason not to me? Need a few hints-- missing the obvious? Using version 24.
EDIT: The load messages look ok except the last message gives the error:
'ARCHICAD.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Program Files\GRAPHISOFT\ARCHICAD 24\GSCEF\CefSharp.Core.dll'. Cannot find or open the PDB file.
It seems like the "Debug Monitor" as used in the documentation is no longer relevant. It sounds like it was a separate application by Graphisoft for debugging and it's not distributed anymore with the API DevKit as mentioned here: https://helpcenter.graphisoft.com/knowledgebase/25738/. In that article it says to just use the Visual Studio output window. So you are doing the right thing there.
Here are two points which I had to do to see the output of the DB functions in Visual Studio. Maybe one of those solves your issue.
(I use VS 2019 but I think there isn't much difference to VS 2017 concerning this issue.)
1. Make sure to use "Attach to:"-> "Native code" when attaching to the Archicad process. This is selectable in the "Attach to Process" window of VS. (mentioned here: https://archicadapi.graphisoft.com/getting-started-with-archicad-add-ons)
2. You can right click in the VS output pane and disable some messages. I had to disable "Module Load Messages" and "Module Unload Messages" to get rid of clutter and see the things I logged with the DB functions.
I did download the Debug Monitor zip file and unzipped it as mentioned in the Blog.
Do you mean the zip file from this blog post?: https://archicadapi.graphisoft.com/tools-for-debugging
If so, I think it's not necessary. The files just give a nicer representations for looking at variables during debugging, but I don't think it would make a difference for DB function calls. Or do you mean another zip file? (I couldn't find anything else)
I missed the point about checking the NATIVE code box but it's still not working.
The debugger initially loads a number of dll's with the message of: "Symbols loaded". It then tries to load other Dll's but I get the error message of: "can not find or open PDB file". and it just continues in this mode repeating. i finally have to cancel the debugger.
I think in general it should not be a problem to have some "can not find or open PDB file" messages. Where do you get those messages? I see them in the "Module" page. See this picture:
Here's also a picture attached of how the output pane looks for me with a nonsense DBPrintf message specified by me (my settings for the output pane are also shown):
Another thing to check could be the way you build the project. In the case you are not building in Debug mode, you could try that. The DB functions should also work in a release mode, but just to be sure I would give it a try to build in Debug mode.
Thanks for the help. I am doing all you suggested but the problem remains that the debug screen keeps trying to load certain dll's and just repeats the same attempted dll's over and over-- locking up my machine. I think i'll have to wait for 25 SDK and VS 2019 and see if i get the same things.