Skip to content

Draft: Test suite: make --interactive-debugging run pry in the failure's context

anonym requested to merge interactive-debugging-failure-context into stable

This is a follow-up on !1471 (merged) (#20305 (closed)) where pause() was made to run in the caller's context. Now we also make it so that when pause()ing with --interactive-debugging we do so in the context where the original failure occurred.

This is made possible by monkeypatching Exception's constructor and raise() to save the binding/context it was created in into the exception, which later is available in the After hook where --interactive-debugging is triggered.

Refs: #20329

Merge request reports