Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions Sindarin-Tests/SindarinDebuggerTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -385,19 +385,18 @@ SindarinDebuggerTest >> testIsAboutToInstantiateClass [

{ #category : #tests }
SindarinDebuggerTest >> testIsExecutionFinished [
"Test shows that the debugger is actually not correctly working and therefore it is disabled.
The fix requires the changes in #isExecutionFinished and on the Pharo side (PR#8567)
Once integrated there will be another PR here.
Projects are managed in different repos and therfore such complex integration"
| scdbg |
self skipOnPharoCITestingEnvironment.
scdbg := SindarinDebugger debug: [ self helperMethod16 ].
self deny: scdbg isExecutionFinished.
scdbg
stepOver;
step;
step;
stepOver;
step;
stepOver;
step.
"Reached `self isActiveProcess` in Process>>#terminate"
self assert: scdbg isExecutionFinished

[ scdbg isExecutionFinished ] whileFalse: [ scdbg stepOver ].

self assert: scdbg currentProcess isTerminated
]

{ #category : #tests }
Expand Down
13 changes: 5 additions & 8 deletions Sindarin/SindarinDebugger.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -207,16 +207,13 @@ SindarinDebugger >> deactivateAutoRefreshOfAttachedGraphicalDebugger [
{ #category : #start }
SindarinDebugger >> debug: aBlock [
blockToDebug := aBlock.
process := aBlock newProcess
name: 'ExecutionDebuggedByScriptableDebugger'.

"process on: Exception do: [:ex | DebuggedExecutionSignalledAnException signalWithException: ex. ex resume ]."
process := aBlock newProcess name: 'ExecutionDebuggedByScriptableDebugger'.
sindarinSession := SindarinDebugSession
newWithName: 'ScriptableDebuggerDebugSession'
forProcess: process.
sindarinSession deactivateEventTriggering.
[ self selector = #newProcess ] whileFalse: [ self step ]. "Step the process to get out of the on:do: context added at the bottom of its stack"
[ self selector = #newProcess ] whileTrue: [ self step ]. "Step the process so that it leaves BlockClosure>>#newProcess and enters the block for which a process was created"
"Step the process until it enters the block for which a process was created"
[ self context closure == blockToDebug ] whileFalse: [ self step ]
]

{ #category : #accessing }
Expand Down Expand Up @@ -668,8 +665,8 @@ SindarinDebugger >> stepOver [
startContext := self context.
self step.
[ self context == startContext
or: [ startContext sender isNil
or: [ startContext hasSender: self context ] ] ]
or: [ (startContext isDead or: [ self context isDead ])
or: [ startContext hasSender: self context ]]]
whileFalse: [ self step ]
]

Expand Down