[issue39052] import error when in python -m pdb debug mode

2019-12-21 Thread Xavier de Gaye


Xavier de Gaye  added the comment:

As a workaround insert the following hard-coded breakpoint before the import 
statement and run your script with python, i.e. 'python myhome.py' instead of 
'python -m pdb myhome.p'.

from pdb import Pdb; Pdb(skip=['importlib*']).set_trace()

--
nosy: +xdegaye

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39052] import error when in python -m pdb debug mode

2019-12-14 Thread chengyang

New submission from chengyang :

D:\data\mypython\photosort 的目录

2019/09/08  15:51  .
2019/09/08  15:51  ..
2019/09/08  15:5188 myfilesort.py
2019/09/08  15:38   220 myhome.py
2019/12/15  10:44   275 mymain_menu.py
2019/08/22  21:2439 myphotosort.py
2019/09/08  15:51  siproject
2019/09/08  17:16  __pycache__
   4 个文件622 字节
   4 个目录 253,973,061,632 可用字节

D:\data\mypython\photosort>python -m pdb myhome.py
> d:\data\mypython\photosort\myhome.py(1)()
-> import os
(Pdb) s
> d:\data\mypython\photosort\myhome.py(2)()
-> import re
(Pdb) s
> d:\data\mypython\photosort\myhome.py(3)()
-> import sys
(Pdb) s
> d:\data\mypython\photosort\myhome.py(4)()
-> sys.path.append('d:\data\mypath\photosort')
(Pdb) s
> d:\data\mypython\photosort\myhome.py(5)()
-> import myfilesort
(Pdb) s
--Call--
> (978)_find_and_load()
(Pdb)

--
components: Windows
files: myfilesort.py
messages: 358412
nosy: chengyang, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: import error when in python -m pdb debug mode
type: behavior
versions: Python 3.7
Added file: https://bugs.python.org/file48778/myfilesort.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com