microsoft / debugpy

An implementation of the Debug Adapter Protocol for Python
https://pypi.org/project/debugpy/
Other
1.83k stars 136 forks source link

pydevd_sys_monitoring always throws TypeError #1708

Open vegetablest opened 4 days ago

vegetablest commented 4 days ago

After python debug was automatically updated to version v2024.12.0, this error was reported during debugging. When I rolled back to the previous version, it worked normally.

Error message ```consol ERROR: Exception in ASGI application Traceback (most recent call last): ...... cfunc.to_py.__Pyx_CFunc_7f6725__29_pydevd_sys_monitoring_cython_object__lParen__etc_to_py_4code_11from_offset_9to_offset.wrap File "_pydevd_sys_monitoring\\_pydevd_sys_monitoring_cython.pyx", line 1367, in _pydevd_sys_monitoring_cython._jump_event TypeError: an integer is required ```
xidianzhangjun commented 3 days ago

After python debug was automatically updated to version v2024.12.0, this error was reported during debugging. When I rolled back to the previous version, it worked normally.

Error message

ERROR:    Exception in ASGI application
Traceback (most recent call last):
......
cfunc.to_py.__Pyx_CFunc_7f6725__29_pydevd_sys_monitoring_cython_object__lParen__etc_to_py_4code_11from_offset_9to_offset.wrap
  File "_pydevd_sys_monitoring\\_pydevd_sys_monitoring_cython.pyx", line 1367, in _pydevd_sys_monitoring_cython._jump_event
TypeError: an integer is required

Me too.

rchiodo commented 16 hours ago

Very weird. That code is here:

https://github.com/microsoft/debugpy/blob/39879bdeeae5908a8f3527c77ba252e0930afabc/src/debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring_cython.pyx#L1367

I don't see how from_offset can not be an integer. Sys.monitoring says it's supposed to be an integer.

https://docs.python.org/3/library/sys.monitoring.html#monitoring-event-JUMP

rchiodo commented 15 hours ago

Does anybody have an example application that reproduces the problem?

scottnealon-aerocorp commented 10 hours ago

Seems related to this issue: https://github.com/fabioz/PyDev.Debugger/issues/280

dimas-adi-kris commented 6 hours ago

Does anybody have an example application that reproduces the problem?

In my case, I'm making an odoo module, using vscode debugger, put breakpoint, trigger it. After some debugging, this error sometimes shows several seconds I pause, sometimes right after I unpause the debug

Image

Version: 1.94.2 Commit: 384ff7382de624fb94dbaf6da11977bba1ecd427 Date: 2024-10-09T16:08:44.566Z Electron: 30.5.1 ElectronBuildId: 10262041 Chromium: 124.0.6367.243 Node.js: 20.16.0 V8: 12.4.254.20-electron.0 OS: Linux x64 6.8.0-47-generic

Python : 3.12.7 Python Debugger : 2024.12.0 Odoo : 16.0

Maybe trying to make odoo module is overkill to reproduce this problem. But I'm trying to help