[Pharo-project] Debugger filtering
In the latest Pharo Release we pushed a new Setting for the Debugger: see Settings / Debugging / Filter out common message sends, when enabled the Debugger behaves a bit nicer in most cases by filtering some non-interesting contexts: - "self halt" will now open the Debugger in the sender context, not somewhere on Halt / Object - sends to Kernel Classes are not shown (like Dictionary >> #at:ifAbsent: #do: #collect: ...) - a failing TestCase will open the Debugger in the test method itself So all in all it will save you some clicks and concentrate on the important stack elements For those interested in the details or wanting to extend it see Debugger >> #shouldDisplayContext: best cami
On 6 February 2012 14:48, Camillo Bruni <camillo.bruni@inria.fr> wrote:
In the latest Pharo Release we pushed a new Setting for the Debugger:
see Settings / Debugging / Filter out common message sends, when enabled the Debugger behaves a bit nicer in most cases by filtering some non-interesting contexts:
- "self halt" will now open the Debugger in the sender context, not somewhere on Halt / Object - sends to Kernel Classes are not shown (like Dictionary >> #at:ifAbsent: #do: #collect: ...) - a failing TestCase will open the Debugger in the test method itself
So all in all it will save you some clicks and concentrate on the important stack elements For those interested in the details or wanting to extend it see
    Debugger >> #shouldDisplayContext:
I know what proper implementation of it should be: contextsToShow := stack reject: [:context | context method pragmas anySatisfy: [:pragma | pragma keyword == #skipWhileDebugging ] ] like that, you can tag the methods by yourself, instead of making Debugger too clever to decide: Foo>>bar <skipWhileDebugging> ..some boring code.. and probably the test can be more complicated, since we don't want all #at: method for colleciton, for instance, we should be able to tag only #at: method in Collection itself , so debugger should take the method and check if it overrides a method, which is tagged as unimportant. :)
best cami
-- Best regards, Igor Stasenko.
yes
I know what proper implementation of it should be:
contextsToShow := stack reject: [:context | context method pragmas anySatisfy: [:pragma | pragma keyword == #skipWhileDebugging ] ]
like that, you can tag the methods by yourself, instead of making Debugger too clever to decide:
Foo>>bar <skipWhileDebugging>
..some boring code..
and probably the test can be more complicated, since we don't want all #at: method for colleciton, for instance, we should be able to tag only #at: method in Collection itself , so debugger should take the method and check if it overrides a method, which is tagged as unimportant.
:)
best cami
-- Best regards, Igor Stasenko.
Camillo Bruni wrote:
In the latest Pharo Release we pushed a new Setting for the Debugger:
see Settings / Debugging / Filter out common message sends, when enabled the Debugger behaves a bit nicer in most cases by filtering some non-interesting contexts:
- "self halt" will now open the Debugger in the sender context, not somewhere on Halt / Object - sends to Kernel Classes are not shown (like Dictionary >> #at:ifAbsent: #do: #collect: ...) - a failing TestCase will open the Debugger in the test method itself
So all in all it will save you some clicks and concentrate on the important stack elements For those interested in the details or wanting to extend it see
Debugger >> #shouldDisplayContext:
best cami
That is really great. I have found it hard to adapt to jumping back a forth through the 'aBlock value: (self at: index)' in #do: Does that also include all the system fluff occurring prior to executing... self halt. #(1 2 3 4 5) do: [ :x | Transcript crShow: x ] ...in a Workspace ? cheers, ben
participants (4)
-
Ben Coman -
Camillo Bruni -
Igor Stasenko -
Stéphane Ducasse