Debugging objects with ACCESS/ASSIGN implemented with methods

27 views
Skip to first unread message

Aleksander Czajczynski

unread,
Mar 5, 2013, 4:04:27 PM3/5/13
to harbou...@googlegroups.com
Hello!

Take a look at testcode (dbgobj.prg). When the debugger pops up, use
Monitor -> Locals, then navigate to opened pane and "o" variable. Use
Enter key twice just like you would like to browse it's instance variables.

Debugger is lost while it wants to retreive value of ACCESS Test, you
can't properly control it.

This happens because of two things:
- ACCESS/ASSIGN pair is treated exactly like DATA/VAR (it's object
messages look exactly the same), so the debugger wants to show its contents
- ACCESS here is implemented using a full METHOD syntax, which contains
debug (lines) information. HVM sees this information while executing
Test() method, and the debugger gets reinvoked

I think it shouldn't be reinvoked. I've attached a (rather dirty) patch
to stop it for /src/debug/dbgtobj.prg, which sets debug proccess in Go
mode before browsing an object. It seems to correct faulty behaviour,
but probably there is a better way to get this fixed.

Best regards, Aleksander Czajczy�ski

dbgtobj.quick.patch
dbgobj.prg
Reply all
Reply to author
Forward
0 new messages