# Tag Info

On[Assert] $AssertFunction := ( (*1*) SelectionMove[EvaluationNotebook[], All, Notebook, AutoScroll -> False]; FrontEndExecute @ FrontEndToken @ "RemoveFromEvaluationQueue"; SelectionMove[EvaluationCell[], After, Cell, AutoScroll -> False]; (*2*) RunScheduledTask[$Pre =., {1}]; $Pre = Abort[] &; ... 0 It sounds like you want to inspect the stack when an assertion fails. Will Dialog do what you want? As in$AssertFunction:=Dialog[] As already mentioned however, cells queued for evaluation, and even subsequent lines in the current cell, will still execute when you Return or ExitDialog. You can ExitDialog[Unevaluated[Abort[]]] to abort a statement, but ...