forked from pharo-project/pharo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract Halt from Kernel + Remove obsolete dependency
Fixes pharo-project#3256
- Loading branch information
Showing
8 changed files
with
72 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
Extension { #name : #Object } | ||
|
||
{ #category : #'*Debug-Utils' } | ||
Object >> halt [ | ||
"This is the typical message to use for inserting breakpoints during debugging." | ||
<debuggerCompleteToSender> | ||
Halt now | ||
] | ||
|
||
{ #category : #'*Debug-Utils' } | ||
Object >> halt: aString [ | ||
<debuggerCompleteToSender> | ||
Halt now: aString | ||
] | ||
|
||
{ #category : #'*Debug-Utils' } | ||
Object >> haltFromCount: anInteger [ | ||
"Always halt after a count has been reached" | ||
|
||
<debuggerCompleteToSender> | ||
Halt fromCount: anInteger | ||
] | ||
|
||
{ #category : #'*Debug-Utils' } | ||
Object >> haltIf: condition [ | ||
<debuggerCompleteToSender> | ||
Halt if: condition. | ||
] | ||
|
||
{ #category : #'*Debug-Utils' } | ||
Object >> haltIfNil [ | ||
] | ||
|
||
{ #category : #'*Debug-Utils' } | ||
Object >> haltIfNotTest [ | ||
"Halt if execution was not started by a test. This is useful as this means one can just run tests undisturbed, while a execution for example from the Playground would be halted" | ||
<debuggerCompleteToSender> | ||
Halt ifNotTest | ||
] | ||
|
||
{ #category : #'*Debug-Utils' } | ||
Object >> haltIfTest [ | ||
"Halt if execution was started by a test. These #halts are just active in the tests, useful when you want to add a halt in methods that are executed a lot (e.g. collections)" | ||
<debuggerCompleteToSender> | ||
Halt ifTest | ||
] | ||
|
||
{ #category : #'*Debug-Utils' } | ||
Object >> haltOnCount: anInteger [ | ||
"Halts once when a count is reached" | ||
|
||
<debuggerCompleteToSender> | ||
Halt onCount: anInteger | ||
] | ||
|
||
{ #category : #'*Debug-Utils' } | ||
Object >> haltOnce [ | ||
<debuggerCompleteToSender> | ||
Halt once. | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Extension { #name : #UndefinedObject } | ||
|
||
{ #category : #'*Debug-Utils' } | ||
UndefinedObject >> haltIfNil [ | ||
<debuggerCompleteToSender> | ||
Halt now | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Package { #name : #'Debug-Utils' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters