Allow the debugger to work from inside staged resources

References #23263.
Closes #27445.