Btw, with this trick its not necessary to break before invocation of method. You can put break just after method returns. Think , how powerfull it can be: (example)
BreakPointAgent breakOnLeave: #isString class: Object condition: [:receiver :arguments: :result | Transcript show: receiver printString, '>>isString returns: ', result asString; cr. false "do not break" ]. 2009/1/9 Igor Stasenko <[email protected]>: > 2009/1/9 Janko Mivšek <[email protected]>: >> Dale Henrichs wrote: >>> ----- "Janko Mivšek" <[email protected]> wrote: >>> >>> | And when you are already doing that, introduce also breakpoints back in >>> | Pharo as they are on GLASS GemTools. Very intuitive and the same as on >>> | most other Smalltalks. If they can be supported in GemTools, why >>> | aren't yet in Pharo? Any technical reason? >>> >>> Breakpoints in GLASS/GemTools are taking advantage of the breakpoint >>> feature in the GemStone/S VM. Remember, Squeak/Pharo are used as an >>> OmniBrowser client for GLASS -- the debugger is running in a GemStone vm >>> and the UI is running in the Squeak/Pharo vm. >> >> What I like about breakpoints in GemTools is the simplicity from >> usability standpoint. And similarity of use to other Smalltaltalks. >> >> And because their UI part is implemented in OmniBrowser on GemTools, >> they should be easily ported back to Pharo OmniBrowser, even that >> breakpoints in GS/S are implemented differently than in Squeak. >> >> In other words, let we port the UI for breakpoints first, on top of >> whatever Squeak supports for breakpoints currently. Later breakpoints >> can be enhanced on VM level as well. >> > There is no need in any enhancement from VM side. > > Here attached the scratch implementation of breakpoints for squeak, > took about 15 minutes to implement. > > Usage: > > BreakPointAgent class:<yourclass> selector: <yourselector> "will > install a breakpoint on that method" > > BreakPointAgent removeAll "remove all breaks from system" > > BreakPointTestClass test " a simple test " :) > > now you can subclass it and create a conditional breakpoints, which > will halt only if some criteria met. > It is trivial to add new ivar (criteriaBlock) and change > run: aSelector with: arguments in: aReceiver > to halt only if criteriaBlock evaluates to true. > There is No limits to fantasy :) > > To not hide the actual method (when browsing) BreakPointAgent could be > extended to act as a proxy while it active e.g. simply redirect > messages like #literals and so on to compiled method it replaced. > >> Janko >> >> -- >> Janko Mivšek >> AIDA/Web >> Smalltalk Web Application Server >> http://www.aidaweb.si >> >> _______________________________________________ >> Pharo-project mailing list >> [email protected] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > -- > Best regards, > Igor Stasenko AKA sig. > -- Best regards, Igor Stasenko AKA sig. _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
