Force evennia.set_trace() to go to the upper frame
This commit is contained in:
parent
ff5ffa8d0e
commit
1d1f8d5725
1 changed files with 3 additions and 1 deletions
|
|
@ -365,7 +365,9 @@ def set_trace(debugger="auto", term_size=(140, 40)):
|
||||||
import pdb
|
import pdb
|
||||||
dbg = pdb.Pdb(stdout=sys.__stdout__)
|
dbg = pdb.Pdb(stdout=sys.__stdout__)
|
||||||
|
|
||||||
|
# Force the debugger to go up one frame
|
||||||
|
# (Otherwise, `set_trace` will be placed on this function, not the call)
|
||||||
#
|
#
|
||||||
# stopped at breakpoint. Use 'n' (next) to continue into the code.
|
# stopped at breakpoint. Use 'n' (next) to continue into the code.
|
||||||
#
|
#
|
||||||
dbg.set_trace()
|
dbg.set_trace(sys._getframe().f_back)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue