PY-72345 Pycharm 2024.1 Broken debug on Python 3.12.3

1. Fix the registration of the `PY_RETURN` signal. Stop unregistering the `PY_RETURN` signal for a `code: CodeType` after the first processing of `PY_RETURN`.
2. Fix the `LINE` callback during stepping and `SMART_STEP_INTO` commands.
3. Fix the `PY_RETURN` callback. Added handling for `SMART_STEP_INTO` and `STEP_RETURN` commands.
4. Fix the `_should_enable_line_events_for_code` function. Registration of the `PY_RETURN` and `LINE` signals for a `code: CodeType`.


Merge-request: IJ-MR-149452
Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com>

(cherry picked from commit 8590efb7a1b2d8d6ca2393f18dcbca795e35d211)

IJ-MR-149452

GitOrigin-RevId: 4a157651e52072f3bdc186a61af7562e05a53da7
This commit is contained in:
Egor Eliseev
2024-11-27 09:07:25 +00:00
committed by intellij-monorepo-bot
parent d5f9bf8de0
commit ab01b20a6b
3 changed files with 161 additions and 69 deletions

View File

@@ -0,0 +1,12 @@
def id(x):
return x
def main():
for i in range(100):
print(1)
id(i)
if __name__ == '__main__':
main()