forked from qt-creator/qt-creator
Debugger: Improve pdb debugging
When a script used __file__ to refer to other files by constructing relative paths it ended up trying to use a file relative to the pdbbridge instead the original python file. Fix this by bringing the bridge closer to the original pdb code. Change-Id: I22dda440c78349bfd3dcf4ce748042cc77eb4bee Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -743,12 +743,12 @@ class QtcInternalDumper:
|
||||
# So we clear up the __main__ and set several special variables
|
||||
# (this gets rid of pdb's globals and cleans old variables on restarts).
|
||||
|
||||
# import __main__
|
||||
import __main__
|
||||
# __main__.__dict__.clear()
|
||||
# __main__.__dict__.update({'__name__' : '__main__',
|
||||
# '__file__' : mainpyfile,
|
||||
__main__.__dict__.update({'__name__' : '__main__',
|
||||
'__file__' : mainpyfile,
|
||||
# '__builtins__': __builtins__,
|
||||
# })
|
||||
})
|
||||
|
||||
# When bdb sets tracing, a number of call and line events happens
|
||||
# BEFORE debugger even reaches user's code (and the exact sequence of
|
||||
|
||||
Reference in New Issue
Block a user