[Seaside] Debugger hack for dynamic variables

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Seaside] Debugger hack for dynamic variables

Bany, Michel
Like me, some of you may have noticed that the debugger suspends
execution when executing "self session" or "WACurrentSession value"
even when "stepping over" while the debugger is opened.
And like me, some of you may find this very annoying.

I found the following hack to prevent this :

checkHandlerBlock: block value: selector
 
        "Answer true if the exception handler is about to run,
        except for Seaside dynamic variables"

        | blockClass |
        blockClass := self _objectClass: block.
        method == (GenericException compiledMethodAt: #performHandler:)
                ifTrue:
                        [^(blockClass == BlockClosure and: [selector ==
#value:]) and:
                                        [block method homeMethod
                                                ~=
(Seaside.WADynamicVariable class compiledMethodAt: #use:during:)]].
        (blockClass includesBehavior: GenericException)
                ifTrue: [^selector == #aboutToDebug].
        ^false


Since this area of VW is quite beyond me, I'm checking with the list
if this could be implemented in a better way.

Thanks in advance,
Michel.