[Lazarus] Impossible to debug with Lazarus IDE

Martin Schreiber fpmse at bluewin.ch
Fri Oct 31 09:19:20 CET 2008


On Friday 31 October 2008 07.48:36 mitya boyarintsev wrote:
>
> Do i understand you right? MSEide cannot resovle properties as well?

Correct. MSEide can not access property values. Fortunately prepending the 
property name with 'F' usual works because of the naming convention.

> I've 
> installed MSEide, but after building a project, MSEide did not start
> debugging for some reason. So could not actually see debugging alive. (It
> seems like i've missed something with configuration)
>
Please use NNTP:
news://news.grid-sky.com/public.mseide-msegui.talk
for questions about MSEide+MSEgui.

> Anyway. What about OOP debugging? let's say we have 2 classes
> TA = class(TObject)
>   function Value: Integer;
>   procedure Method; virtual;
>
> TB = class(TA)
>   procedure Method; override;
>
> If i'm trying to debug B.Method, will debugger be smart enough to evaluate
> .AValue call inside B.Method correctly?
>
You mean to show the result of TA.Value in the Watch Window? It is possible to 
call functions in debuggee by gdb. MSEide uses this feature to release the 
debuggee mouse grab in X11.
Calling a property getter function is dangerous because the function often 
does more than simply return the value.
If I need access to a property for debugging purpose, I insert an assignment 
to a "testvar" in code. After the problem has been solved, a "Find in Files" 
for "testvar" helps to clean up the code.

> While Lazarus debugger doesn't have enough debug info, it could use
> CodeTools to create the proper evaluation expression.

MSEide parses the source code for code navigation and class competion only. 
The MSEide debugger uses only information which gdb provides, for example to 
correctly display widestrings and dynamic arrays. This has the advantage to 
be independent of possible discrepancies between FPC and the imprecise IDE 
parsing. 
Because Lazarus parses the whole code including RTL exactly AFAIK, Lazarus has 
more possibilities than MSEide to access Pascal specialties.
Although I don't suggest it, it seems error prone to me.

Martin



More information about the Lazarus mailing list