我知道这是一个长期讨论的话题,并且这里也回答了一个类似的问题,但不幸的是,网上冲浪的解决方案对我不起作用。
我已经正确设置了所有内容,我认为描述问题的最佳方法是在 Eclipse 中发布我的控制台日志。
pydev debugger: starting
('Executing file ', 'D:\\workspace\\vimsgeomanager\\src\\videosorveglianza\\manage.py')
('arguments:', "['D:\\\\workspace\\\\vimsgeomanager\\\\src\\\\videosorveglianza\\\\manage.py', 'runserver', '--noreload']")
('Connecting to ', '127.0.0.1', ':', '63320')
('Connected.',)
('received command ', '501\t1\t1.1')
sending cmd: CMD_VERSION 501 1 1.1
sending cmd: CMD_THREAD_CREATE 103 2 <xml><thread name="pydevd.reader" id="-1"/></xml>
sending cmd: CMD_THREAD_CREATE 103 4 <xml><thread name="pydevd.writer" id="-1"/></xml>
('received command ', '111\t3\tD:\\workspace\\vimsgeomanager\\src\\videosorveglianza\\Contrib\\VimsNVRX\\drivers\\NVRX_Manager.py\t32\t**FUNC**connect\tNone')
Added breakpoint:d:\workspace\vimsgeomanager\src\videosorveglianza\contrib\vimsnvrx\drivers\nvrx_manager.py - line:32 - func_name:connect
('received command ', '111\t5\tD:\\workspace\\vimsgeomanager\\src\\videosorveglianza\\Contrib\\VimsNVRX\\drivers\\NVRX_Manager.py\t35\t**FUNC**connect\tNone')
Added breakpoint:d:\workspace\vimsgeomanager\src\videosorveglianza\contrib\vimsnvrx\drivers\nvrx_manager.py - line:35 - func_name:connect
('received command ', '111\t7\tD:\\workspace\\vimsgeomanager\\src\\videosorveglianza\\Contrib\\VimsNVRX\\drivers\\NVRX.py\t467\t**FUNC**getStreamCaps\tNone')
Added breakpoint:d:\workspace\vimsgeomanager\src\videosorveglianza\contrib\vimsnvrx\drivers\nvrx.py - line:467 - func_name:getStreamCaps
('received command ', '122\t9\t;;')
Exceptions to hook : []
('received command ', '124\t11\t')
('received command ', '101\t13\t')
ContribUtils.appendConf: considero la cartella D:\workspace\vimsgeomanager\src\videosorveglianza\conf\contrib
MODALITA' SINGOLO SERVER
SETTINGS DI DEBUG: trovato specialconf
ContribUtils.appendConf: considero la cartella D:\workspace\vimsgeomanager\src\videosorveglianza\conf\contrib
MODALITA' SINGOLO SERVER
SETTINGS DI DEBUG: trovato specialconf
Validating models...
0 errors found
Django version 1.2, using settings 'videosorveglianza.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
sending cmd: CMD_THREAD_CREATE 103 6 <xml><thread name="MainThread" id="pid4420_seq4" /></xml>
('received command ', '112\t15\tD:\\workspace\\vimsgeomanager\\src\\videosorveglianza\\Contrib\\VimsNVRX\\drivers\\NVRX_Manager.py\t35')
Removed breakpoint:d:\workspace\vimsgeomanager\src\videosorveglianza\contrib\vimsnvrx\drivers\nvrx_manager.py
('received command ', '111\t17\tD:\\workspace\\vimsgeomanager\\src\\videosorveglianza\\Contrib\\VimsNVRX\\drivers\\NVRX_Manager.py\t35\t**FUNC**connect\tNone')
Added breakpoint:d:\workspace\vimsgeomanager\src\videosorveglianza\contrib\vimsnvrx\drivers\nvrx_manager.py - line:35 - func_name:connect
服务器对每个请求都正确响应,唯一的问题是它没有在断点处阻塞;更准确地说,它仅适用于 manage.py 中添加的断点
为了避免误解,我的机器上有服务器的代码,它是一个 Eclipse 项目,所以我不想使用 PyDev 提供的远程调试器工具。我想简单地放置一个断点并在代码执行时停止代码。
我已经尝试过更改 PyDev 的常量
DEBUG_TRACE_LEVEL
DEBUG_TRACE_BREAKPOINTS
非常感谢您提供的每一个提示!