akg-ghost

Description

Extensions to the Pharo Ghost module

Details

Source
GitHub
Dialect
pharo (25% confidence)
Created
April 22, 2017
Updated
April 22, 2017

Categories

System / OS Language Extensions

README excerpt

# akg-ghost
akg-ghost provides two extensions to the Pharo Ghost module.

Ghost is a neat package from Denis Kudriashov that allows you to set a breakpoint on an object, regardless of which message is sent to the object.  For an introduction, please see http://dionisiydk.blogspot.cz/2016/04/halt-next-object-call.html

akg-ghost extends Denis' framework with two classes:

1. ExternalSendLogger logs all messages sent to the target object using the Beacon framework.
1. ExternalSendTrace keeps a simple count of all messages sent to the target object.

As an example, to get a message tally of messages sent to a point object:

```
| point trace |

point := 2@3.
trace := ExternalSendStats logStatsFor: point.
point
	x;
	y;
	angle;
	x.
trace stats.
"a Dictionary(
	#angle->1 
	#x->2 
	#y->1 )"
```

To load akg-ghost:

```
Metacello new 
	baseline: 'AkgGhost';
	repository: 'github://akgrant43/akg-ghost:master/mc';
	load
```
← Back to results