-
-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
integrating Debug Points model into Pharo #16177
integrating Debug Points model into Pharo #16177
Conversation
There is a bootstrap error, I need to check |
This is strange. Let us know if you need help. |
Could you point us to the error? |
I learned something :) tx! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did only a partial pass, I will continue later.
In this pass, there are typos that needs to be fixed and comments for future work (i.e., not to be treated in this PR).
DebugPoint all copy do: [ :debugPoint | | ||
debugPoint link methods | ||
detect: [ :m | m methodClass = anAnnouncement classRemoved ] | ||
ifFound: [ debugPoint remove ] ] | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For later: because the DebugPoint model the breakpoints at a higher level than metalinks, it would simplify things (like that method) to know more of the underlying model, for instance here it would make sense that each debug points knows the structural elements on which it is installed/active.
In this case the debug point would know the methods it targets.
forObject: anObject | ||
onVariableNamed: aSlotNameSymbol | ||
accessStrategy: #read | ||
withBehaviors: { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same remark about empty behaviors.
forObject: anObject | ||
onVariableNamed: aSlotNameSymbol | ||
accessStrategy: #write | ||
withBehaviors: { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same remark on empty behaviors.
inClass: aClass | ||
onVariableNamed: aSlotNameSymbol | ||
accessStrategy: #all | ||
withBehaviors: { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same remark about empty behaviors.
| announcement | | ||
announcement := DebugPointAdded | ||
on: aDebugPoint | ||
nodes: aDebugPoint link nodes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the question of high/low level concernes, I wonder if the nodes should be known by the model or only by the underlying implementation? @MarcusDenker do you have an opinion on that?
DebugPoint all copy do: [ :debugPoint | | ||
debugPoint link methods | ||
detect: [ :m | m == aMethod ] | ||
ifFound: [ debugPoint removeFromMethod: aMethod ] ] | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same remark, for future work: the debug point model should probably know the methods it affects without having to ask them to the metalink.
This was merged with failing tests |
This PR integrates a new tool to Pharo (at least the model) that will replace the existing breakpoints and watchpoints model.
The original repository is here: https://github.com/adri09070/PharoDebugPoints (which is a fork of another repository: https://github.com/Max-Zurbriggen/PharoDebugPoints from @Max-Zurbriggen ).
This tool allows to install debug points on different type of targets:
Debug points are different types of instrumentation that are used to debug. For now, there are two concret types of debug points: breakpoints and watchpoints.
A debug point can have different types of behaviors that will execute before the debug point is actually hit.
Among these behaviors, there are:
true
to hit the debug pointAll these behaviors can be set when creating a breakpoint from the Calypso browser in the method editor.
To have more flexibility to configure existing debug points or to create different types of debug points, it is possible to use an API on
DebugPoint
objects or via theDebugPointManager
.It will be possible to configure debug points via a UI tool, the Debug Point Browser, which will be the object of another PR in NewTools