2023-11-13 11:29 AM - last edited a month ago by Doreena Deng
Dear Community,
I'm encountering a problem with debugging in Visual Studio on Windows. Despite setting up everything correctly, the breakpoints are not being hit, and Visual Studio warns that "No symbols have been loaded for this document." We have ensured that symbols are loaded from the system.
Also Enabled tools for debuggung on Windows as mentioned here.
Attached are screenshots of the debug output and our configuration for your reference. Any insights or advice on what we might be missing or doing wrong would be greatly appreciated.
Solved! Go to Solution.
2023-11-26 12:03 PM
Make sure the AddOn project is set as your startup project
You can change it from the solution properties
Then clean and rebuild the project/solution. Check if a .pdb file has been created in the output directory. And finally follow the steps from the previous post to start debugging.
I noticed in your code you check if height is not zero. This way of comparing two numbers with decimal point is wrong because of their internal representation in the computers. Always use some accuracy when compare. Check for example Element_Test where you can find code like this
double len = vx * vx + vy * vy;
if (len < EPS) {
....
}
EPS is defined in RealNumber.h
static constexpr double EPS = 1E-05; /* 0.00001 Machinery zero for general purp. */
2023-11-13 07:09 PM
FYI : Can't help you with this one BUT -- This has been a continuing problem with some configurations and is also a problem with version 27 and VS 2022. There have been many complaints over the years. On the other hand, Graphisoft just recognized this as a bug with 27 and VS 2022 and logged it for further investigation. So maybe we'll see some resolution in the near future -- or maybe not?
2023-11-14 08:49 AM
Thank you for your response.
Could you advise on how to obtain execution logs for ARCHICAD, similar to the way logs are generated when starting ARCHICAD from a terminal on macOS? Also any tips for efficiently capturing these logs would be greatly appreciated, as they are crucial for our development and debugging efforts.
2023-11-14 11:23 AM - edited 2023-11-14 11:24 AM
I don't have any problems with debugging Add-Ons, this is the way I do it, maybe it will help.
Please note that if the Add-On is not preloaded, the breakpoints will be active only when the Add-On is used, and before that you will see inactive breakpoints.
2023-11-26 12:03 PM
Make sure the AddOn project is set as your startup project
You can change it from the solution properties
Then clean and rebuild the project/solution. Check if a .pdb file has been created in the output directory. And finally follow the steps from the previous post to start debugging.
I noticed in your code you check if height is not zero. This way of comparing two numbers with decimal point is wrong because of their internal representation in the computers. Always use some accuracy when compare. Check for example Element_Test where you can find code like this
double len = vx * vx + vy * vy;
if (len < EPS) {
....
}
EPS is defined in RealNumber.h
static constexpr double EPS = 1E-05; /* 0.00001 Machinery zero for general purp. */
2023-12-01 06:09 AM - edited 2023-12-01 06:10 AM
HI @kolioi
Thanks for the reply. I tried with same setup but the .pdb was not created . Is it beacuse of the version issue?
This is my build output.
1>
1>
2>------ Rebuild All started: Project: AddOn, Configuration: Debug x64 ------
2>AddOnMain.cpp
2>ArchiCADElements.cpp
2>DataProcessor.cpp
2>MigrationUtils.cpp
2>SnaptrudeConnector.cpp
2>Utils.cpp
2>Generating Code...
2>ACAP_STATD.lib(ACAPlib_.obj) : warning LNK4099: PDB 'API_c.pdb' was not found with 'ACAP_STATD.lib(ACAPlib_.obj)' or at 'C:\Users\Sijo\Documents\snaptrude\snaptrude-poc\Build\Debug\API_c.pdb'; linking object as if no debug info
2> Creating library C:/Users/Sijo/Documents/snaptrude/snaptrude-poc/Build/Debug/Test.lib and object C:/Users/Sijo/Documents/snaptrude/snaptrude-poc/Build/Debug/Test.exp
2>AddOn.vcxproj -> C:\Users\Sijo\Documents\snaptrude\snaptrude-poc\Build\Debug\Test.apx
2>Done building project "AddOn.vcxproj".
3>------ Skipped Rebuild All: Project: ALL_BUILD, Configuration: Debug x64 ------
3>Project not selected to build for this solution configuration
========== Rebuild All: 2 succeeded, 0 failed, 1 skipped ==========
========== Rebuild started at 10:34 and took 12.662 seconds ==========
As we can see that there is no .pdb file were created. this causes the debugging prossess.
Any solution for this? Thanks in advance