How to debug without breakpoints?

How to debug without breakpoints?

Anonymous
Not applicable
2,317 Views
4 Replies
Message 1 of 5

How to debug without breakpoints?

Anonymous
Not applicable

Visual Studio 2012. AutoCAD 2015.
I ise c++. I am building dll library.

in visual studio have no visible variables during debugging.
variables are visible only when the breakpoint.
I am building with the flag "MD".


How to debug without breakpoints?

How to debug since the launch of the program?

 

0 Likes
Accepted solutions (1)
2,318 Views
4 Replies
Replies (4)
Message 2 of 5

moogalm
Autodesk Support
Autodesk Support

Hi,

 

Unfortunately I didnt understand your query, can you explain me your query with more detail, flag /MD is right one for building a Acad arx-dll.

0 Likes
Message 3 of 5

Anonymous
Not applicable
Accepted solution
I dont know any high level language that displays the values of variables while the program is running. It would not make much sense anyway:
- The values would probably change too fast for you to see. Also they would flicker on / off all the time as the variable goes into and out off scope.
- You would need to somehow tell MSVC which variable you want. For example I would expect in our code to be probablöy 1000s or 10000s of integer variables called "i", almost all of them local variables to some function.

I interpret you second question to be "what is the first place in my code that is called by AutoCAD so I can set a breakpoint in it".
I think yoiu will find one of the first places called by searching for "kInitAppMsg"
Message 4 of 5

OysteinW
Advocate
Advocate

It's a bit difficult to interpret the question, but if the problem is that you're not hitting any break points, you probably need to do a debug build.

 

Ensure C/C++/General tab in project properties has 'Debug Information Format' set to 'Program Database (/Zi), and Linker/Debugging tab has 'Generate Debug info' set to 'Yes (/DEBUG)' and 'Generate Program Database File' is set to $(OutDir)$(TargetName).pdb.

 

 

 

 

0 Likes
Message 5 of 5

tbrammer
Advisor
Advisor

You can break the execution in the Debugger at any time. But if you do this, you will probably not break inside of any of your functions. So you can only watch global variables.

To find out when a variable changes it's value, you can add "data breakpoints". 

The very first function, that is called in an ARX, DAX or DLL, is DllMain().

 


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

0 Likes