简体   繁体   中英

PyDev debugging: do not open “_pydev_execfile” at the end

I am new to both Python and Eclipse.

I am debugging a module file with Eclipse/PyDev. When I click "Step over" or "Step return" at the last line of the file, Eclipse opens the file "_pydev_execfile" where I have to click "Step over" or "Step return" again, before the debugging is terminated.

Does this occur for everyone or just me?

Can I avoid this?

In general, you can put # @DontTrace at the end of lines that define functions to ignore these functions in the traceback.

In the particular case described in the question, this works as follows: Change the definition of execfile() in _pydev_execfile.py to:

def execfile(file, glob=None, loc=None):  # @DontTrace
    ...

Afterwards, PyDev ends up opening another file ( codecs.py ) at the end of debugging. To fix this, you will have to @DontTrace a few more functions in that (but only in that one) file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM