Ooops, sorry, I did not see your answer. ;-/

I will study it tonight.

Many thanks.

Fre;D


On Thursday 28 January 2016 11:36:10 Fred van Stappen wrote:
Hello Martin.

Could you explain your (best) way to debug a program with MSEide?

Not the "best" way but how I debug programs. It heavily depends on the actual 
problems.
In order to check why a subroutine in a GUI program doesn't what it should I 
set a breakpoint on the start of the procedure/function, run the program and 
trigger the calling of the subroutine by the necessary actions (click on 
button or select a menu item...). After the program stopped at the breakpoint 
I step through the code by F8/F7 and add or check interesting watches or 
inspect values by moving the mouse above the corresponding identifier.
Sometimes it is useful to modify a variable for testing purpose. It can be 
done by editing the 'Result' column in 'Watches' window.

If there is an exception I activate 'Project'-'Options'-'Debugger'-'Stop on 
Excep.', run the program and check the 'Stack' window when the exception 
happens. A double click in 'Stack' window on the row with the subroutine 
which throws the exception shows the source code. If the reason for the 
exception is not immediately recognisable I set a breakpoint to the 
interesting code, restart the program and and check the correct execution by 
stepping after stop on the breakpoint.
If there are runs of the subroutine without throwing an exception it is 
sometimes possible to define a breakpoint condition in order to filter the 
interresting run. Double click in source editor on the breakpoint row shows 
the according breakpoint in 'Breakpoints' window. Enter the filter expression 
in 'Condition' column.
Another option is to set 'Ignore' of the breakpoint to a big value and 
restarting the program. After stop by the exception check 'Count' of the 
breakpoint, set 'Ignore' to one less than 'Count' and restart the program. It 
will stop at the breakpoint in the run which throws the exception.

In a complex asynchronous program it sometimes happens that a variable will be 
changed by a unknown subroutine. In order to check what changes a already set 
value show the value in 'Watches', RightClick-'Address Watchpoint *'. This 
adds an item in 'Watchpoints' which stops the program if the according 
address will be overwritten.

How to use Watches, Stack, ... forms ?

See above.

How to use BreakPoints, Watches,...?

See above.

The utility of Exec Line Hint On...?

It switches on the blue dots for the source lines with debuginfo.

Maybe a example with a bug and all the steps to debug it.

Another user maybe can provide a concrete example.

Also how to use Stack, Symbol, Memory, CPU and Threads forms.

For a stopped program:

'Stack' shows the subroutine call stack.
'Symbol' shows what gdb knows about the listed symbols.
'Memory' provides a memory dump.
'CPU' shows the CPU registers.
'Threads' shows the threads. Clicking in a row selects the current thread 
context.

Martin                                    
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to