我已经更改了一些代码,可以确认我更改的行导致应用程序显示不同的文本
但是,当我像这样在该行上设置断点时,它永远不会在断点处停止
以下是我在控制台中看到的内容。在尝试附加调试器时,似乎出现了问题:
Attaching to a process with PID=47102
/bin/bash "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/pydevd_attach_to_process/attach_pydevd.py" --port 65032 --pid 47102
from: can't read /var/mail/__future__
/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/pydevd_attach_to_process/attach_pydevd.py: line 2: import: command not found
/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/pydevd_attach_to_process/attach_pydevd.py: line 3: import: command not found
/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/pydevd_attach_to_process/attach_pydevd.py: line 4: import: command not found
/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/pydevd_attach_to_process/attach_pydevd.py: line 5: import: command not found
/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/pydevd_attach_to_process/attach_pydevd.py: line 8: syntax error near unexpected token `('
/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/pydevd_attach_to_process/attach_pydevd.py: line 8: `def process_command_line(argv):'
Process finished with exit code 0
然后,当我查看该文件时,它如下所示:
from __future__ import print_function
import sys
import os
import subprocess
import traceback
def process_command_line(argv):
setup = {}
setup['port'] = 5678 # Default port for PyDev remote debugger
setup['pid'] = 0
setup['host'] = '127.0.0.1'
setup['protocol'] = ''
i = 0
while i < len(argv):
if argv[i] == '--port':
del argv[i]
setup['port'] = int(argv[i])
del argv[i]
elif argv[i] == '--pid':
del argv[i]
setup['pid'] = int(argv[i])
del argv[i]
elif argv[i] == '--host':
del argv[i]
setup['host'] = argv[i]
del argv[i]
elif argv[i] == '--protocol':
del argv[i]
setup['protocol'] = argv[i]
del argv[i]
if not setup['pid']:
sys.stderr.write('Expected --pid to be passed.\n')
sys.exit(1)
return setup
有人对可能出现的问题有什么建议吗
目前没有回答
相关问题 更多 >
编程相关推荐