Skip to content

stepToReturn command doesn't step to non-local returns (in block) #21

Closed

Description

@adri09070

In SindarinDebugger, the stepToReturn command doesn't step to returns in blocks, as its implementation uses stepOver:

stepToReturn

	[ 
	self context instructionStream willReturn or: [ self hasSignalledUnhandledException ] ] 
		whileFalse: [ self debugSession stepOver ]

Thus, in SindarinDebuggerTest, the testStepToNonLocalreturn is red:

testStepToNonLocalReturn
	| dbg |
	self skipOnPharoCITestingEnvironment.	
	dbg := SindarinDebugger debug: [ self helperMethodNonLocalReturn ].
	dbg stepToMethodEntry.
	dbg stepToReturn.
	
	self assert: dbg node isReturn.
	self assert: dbg topStack equals: 42

It could be fixed with a version doing stepOver (necessary to stop on exception signals, while skipping halts) and doing stepInto only when we are on a message node that has a block node that is defined in the same lexical context as the context in which we want to step to return.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions