|
Here is a list of frequently asked questions and answers, mainly about Debug Assistant 3.5. We will post
other question as well down the road.
I have tried everything in Debug Assist, result is still empty. Why?
There is a list of things you can check on:
1) The modules (projects) you have selected to trace
are 64bit or .NET, therefore no code can be traced.
2) Debug information is not available for selected module.
if you are using .pdb files, make sure they are either in its original place when they are created, or in the same
directory with the DLL/EXE. It is also possible your .pdb file and the DLL/EXE don't match. You need to rebuild
your project or find the right .pdb files. Or maybe you haven't
build your project with debug information at all. Please check project settings:
under C/C++->General->Debug information format, make sure not to select "Disabled".
"Disabled" is the default for release build, in general, you should switch your
project to Debug build while running trace.
3)
Check trace scope and the range of the program you have run.
Probably the code you have selected never run.
4) You haven't turned on trace. Make sure turn on trace while
you run your program by clicking Turn On Trace button on DebugAssist window.
5) You started your program yourself,
not from Debug Assistant. You should start your program from Debug Assistant window by clicking the Start Process
button. Or if your program already started, you can attach it to Debug Assist by clicking Attach Process button on
Debug Assistant window.
Why trace each line of code while you can trace by code blocks?
Parsing code blocks and trace code blocks certainly make trace much more efficient,
but the timing information is not as complete as it is now. And you will not be able to
see execution flows like what you see with Debug Assistant.
I have a large code base with many projects in one solution, how can Debug Assistant help?
Debug Assistant is designed to solve problems with complicated logic and large code bases, where
it is hard to look through where the program flows go. Especially for a period of execution, you
don't know where it starts, where it ends, or there is too much going on between them.
What problem do I expect using Debug Assitant?
The most common problem a new user has is: get a flooding trace result, or no result at all.
The source of the problem is usually user does not setup a proper trace scope. It is not setup
by default. User need to select modules (projects), files, include/exclude functions.
On one hand,
if you don't select anything or modules are not traceable, like .NET assemblies or 64bit target,
you won't get any trace result.
On the other hand, most of time you will get too many execution points, and most of them are not of your interest. After you click Start Process or Attach Process button
there is option to trace function only or trace every line. Trace function will only put trace
point at the beginning and end of functions in selected scope. This can significantly reduce
result size, but sometimes it is not enough to show the execution details.
For a large trace scope,
it is best to trace function only, that gives you an idea what to exclude in subsequent trace. Then you
can select trace every line to show details. Depending on situation, you may need start/restart process
a few times to get the result you want.
I have selected just one short C++ file for trace, why do I get a large amount of trace result?
Please be aware even a small trace scope can get a large amount of trace
result. For example, if you selected to trace functions that responding to paint (OnPaint), and you
have a lot of code process painting, that's how you get so much trace result. Windows generates tons of messages like
WM_PAINT, WM_MOUSEMOVE. If you are not interested these message handler, please exclude them from trace.
Does Debug Assistant record variable values during execution?
No. It would require getting data from the call stack which is extremely expensive to do for live tracing.
Do I have to rebuild my projects after a trace?
No. Debug Assistant does NOT change your DLLs or EXEs files on your disk. It inserts trace points to the
loaded modules in the memory.
Can I trace a process that I have no source code of?
No. Current implementation setup scope based on the selection of source files. Future versions may remove
this limitation. If you have no source for some module, it is just that this module will not be traced.
Other modules are not affected.
What if I have no debug information?
If there is no embedded debug information, or pdb or dbg files, this module will be ignored.
But this does not affect other modules.
|