debugpy 1.8.5__zip → 1.8.7__zip
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {debugpy-1.8.5/src/debugpy.egg-info → debugpy-1.8.7}/PKG-INFO +1 -1
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_calltip_util.py +19 -21
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_completer.py +30 -30
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_execfile.py +3 -1
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_filesystem_encoding.py +43 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_getopt.py +35 -32
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_imports_tipper.py +83 -84
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_jy_imports_tipper.py +92 -99
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_log.py +2 -3
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_saved_modules.py +51 -27
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_sys_patch.py +11 -7
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_tipper_common.py +6 -5
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/fsnotify/__init__.py +34 -38
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_console_utils.py +71 -69
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_import_hook.py +1 -3
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_imports.py +0 -1
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_ipython_console.py +14 -16
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_ipython_console_011.py +81 -93
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_is_thread_alive.py +3 -3
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_localhost.py +9 -8
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_log.py +33 -25
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey.py +183 -170
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey_qt.py +33 -29
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_override.py +6 -4
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_umd.py +19 -18
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_versioncheck.py +3 -3
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles.py +165 -138
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_coverage.py +77 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_nose.py +35 -36
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_parallel.py +22 -23
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_parallel_client.py +37 -57
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_pytest2.py +54 -52
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_unittest.py +28 -37
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_xml_rpc.py +56 -53
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__main__pydevd_gen_debug_adapter_protocol.py +604 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/debugProtocol.json +551 -445
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_base_schema.py +25 -29
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema.py +17458 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema_log.py +11 -12
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevconsole_code.py +18 -19
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_additional_thread_info.py +41 -0
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_additional_thread_info_regular.py +328 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_api.py +263 -214
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_breakpoints.py +7 -10
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_bytecode_utils.py +187 -92
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_bytecode_utils_py311.py +105 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_code_to_source.py +46 -51
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_collect_bytecode_info.py +239 -176
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py +370 -297
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm_constants.py +78 -86
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_command_line_handling.py +55 -59
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/pydevd_concurrency_logger.py +194 -58
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/pydevd_thread_wrappers.py +2 -3
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_console.py +18 -23
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_constants.py +159 -127
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_custom_frames.py +10 -12
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.c +55527 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.pxd +15 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.pyx +803 -511
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython_wrapper.py +18 -7
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_daemon_thread.py +32 -24
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_defaults.py +11 -13
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_dont_trace.py +16 -16
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_dont_trace_files.py +27 -2
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_exec2.py +1 -1
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_extension_api.py +4 -5
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_extension_utils.py +8 -10
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_filtering.py +50 -45
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_frame.py +462 -407
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_frame_utils.py +69 -61
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_gevent_integration.py +14 -16
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_import_class.py +27 -25
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_io.py +40 -42
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_json_debug_options.py +200 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command.py +20 -19
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_json.py +199 -108
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_net_command_factory_xml.py +121 -73
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_plugin_utils.py +208 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command.py +206 -159
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py +346 -334
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_referrers.py +75 -80
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_reload.py +35 -35
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_resolver.py +116 -124
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py +44 -58
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_safe_repr.py +51 -55
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_save_locals.py +4 -2
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_signature.py +24 -24
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_source_mapping.py +19 -20
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_stackless.py +45 -49
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_suspended_frames.py +61 -58
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_thread_lifecycle.py +23 -13
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_timeout.py +29 -31
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch.py +41 -11
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_trace_dispatch_regular.py +117 -55
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_traceproperty.py +11 -14
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_utils.py +90 -89
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_vars.py +106 -97
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_vm_type.py +40 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_xml.py +56 -46
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_cython_wrapper.py +5 -5
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_main.py +71 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.c +11165 -5326
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_tracing.py +5 -6
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_modify_bytecode.py +53 -56
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/__init__.py +1 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/bytecode.py +4 -6
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/cfg.py +6 -26
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/concrete.py +7 -21
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/flags.py +5 -24
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/instr.py +10 -34
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/peephole_opt.py +1 -4
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/__init__.py +2 -6
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_bytecode.py +3 -5
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_cfg.py +11 -31
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_code.py +2 -2
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_concrete.py +14 -41
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_flags.py +2 -4
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_instr.py +7 -18
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_misc.py +6 -18
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/test_peephole_opt.py +7 -18
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/util_annotation.py +1 -3
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/pydevd_fix_code.py +14 -19
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring.py +1929 -0
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring_cython.c +43253 -0
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring_cython.pxd +46 -0
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring_cython.pyx +1935 -0
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/_pydevd_sys_monitoring/pydevd_sys_monitoring.py +16 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_app_engine_debug_startup.py +12 -11
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_coverage.py +30 -32
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhook.py +58 -54
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookglut.py +20 -24
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookgtk.py +8 -7
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookgtk3.py +8 -6
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookpyglet.py +11 -8
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookqt4.py +21 -18
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookqt5.py +17 -15
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookqt6.py +17 -15
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhooktk.py +6 -4
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/inputhookwx.py +14 -10
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/matplotlibtools.py +30 -26
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydev_ipython/qt.py +24 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/qt_for_kernel.py +37 -34
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/qt_loaders.py +86 -73
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/version.py +7 -7
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydev_pysrc.py +1 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_run_in_console.py +23 -24
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydev_sitecustomize/sitecustomize.py +267 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevconsole.py +55 -47
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd.py +732 -508
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/_always_live_program.py +40 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/_check.py +1 -0
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/_test_attach_to_process.py +11 -0
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/_test_attach_to_process_linux.py +75 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py +130 -125
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_amd64.dll +0 -0
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_amd64.pdb +0 -0
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_pydevd.py +89 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_script.py +41 -32
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_x86.dll +0 -0
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_x86.pdb +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_utils.hpp +1 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_version.hpp +9 -1
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_amd64.exe +0 -0
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_amd64.pdb +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_x86.exe +0 -0
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_x86.pdb +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/lldb_prepare.py +10 -9
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_amd64.dll +0 -0
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_amd64.pdb +0 -0
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_x86.dll +0 -0
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_x86.pdb +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/__init__.py +103 -119
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/breakpoint.py +457 -516
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/compat.py +33 -15
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/crash.py +336 -281
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/debug.py +101 -131
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/disasm.py +148 -153
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/event.py +310 -302
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/interactive.py +235 -208
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/module.py +185 -218
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/process.py +428 -564
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/registry.py +54 -53
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/search.py +69 -73
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/sql.py +158 -170
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/system.py +143 -213
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/textio.py +302 -333
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/thread.py +220 -239
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/util.py +198 -177
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/__init__.py +11 -11
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/advapi32.py +1191 -713
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/context_amd64.py +248 -194
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/context_i386.py +132 -120
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/dbghelp.py +450 -346
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/defines.py +305 -286
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/gdi32.py +526 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/kernel32.py +1479 -1097
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/ntdll.py +579 -0
- debugpy-1.8.7/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/peb_teb.py +3517 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/psapi.py +54 -31
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/shell32.py +170 -149
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/shlwapi.py +190 -108
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/user32.py +542 -437
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/version.py +489 -442
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/wtsapi32.py +83 -65
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/window.py +70 -76
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/attach.cpp +17 -9
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/compile_windows.bat +1 -1
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_file_utils.py +141 -120
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/__init__.py +1 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/django_debug.py +175 -149
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions/__init__.py +1 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/__init__.py +1 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/pydevd_helpers.py +5 -5
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/pydevd_plugin_numpy_types.py +28 -28
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/pydevd_plugin_pandas_types.py +22 -30
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/pydevd_plugins_django_form_str.py +3 -2
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/jinja2_debug.py +130 -108
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/pydevd_line_validation.py +27 -14
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_tracing.py +85 -66
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/setup_pydevd_cython.py +96 -59
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_version.py +3 -3
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/common/messaging.py +2 -1
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/server/cli.py +32 -17
- {debugpy-1.8.5 → debugpy-1.8.7/src/debugpy.egg-info}/PKG-INFO +1 -1
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy.egg-info/SOURCES.txt +6 -1
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydev_bundle/_pydev_filesystem_encoding.py +0 -41
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydev_runfiles/pydev_runfiles_coverage.py +0 -76
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__main__pydevd_gen_debug_adapter_protocol.py +0 -592
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema.py +0 -19514
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_additional_thread_info.py +0 -19
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_additional_thread_info_regular.py +0 -153
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.c +0 -43377
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_json_debug_options.py +0 -204
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_plugin_utils.py +0 -91
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_trace_api.py +0 -62
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_vm_type.py +0 -41
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_eval_main.py +0 -48
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydev_ipython/qt.py +0 -23
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydev_pysrc.py +0 -1
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydev_sitecustomize/sitecustomize.py +0 -237
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/_always_live_program.py +0 -32
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/_test_attach_to_process.py +0 -9
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/_test_attach_to_process_linux.py +0 -74
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_amd64.dll +0 -0
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_amd64.pdb +0 -0
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_pydevd.py +0 -79
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_x86.dll +0 -0
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_x86.pdb +0 -0
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_amd64.exe +0 -0
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_amd64.pdb +0 -0
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_x86.pdb +0 -0
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_amd64.dll +0 -0
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_amd64.pdb +0 -0
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_x86.dll +0 -0
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_x86.pdb +0 -0
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/gdi32.py +0 -507
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/ntdll.py +0 -539
- debugpy-1.8.5/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/peb_teb.py +0 -3435
- {debugpy-1.8.5 → debugpy-1.8.7}/DESCRIPTION.md +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/LICENSE +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/MANIFEST.in +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/README.md +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/pyproject.toml +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/setup.cfg +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/setup.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/ThirdPartyNotices.txt +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/__init__.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/__main__.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/__init__.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/_pydevd_packaging.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/_util.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/force_pydevd.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_bundle/__init__.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydev_runfiles/__init__.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/__init__.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__init__.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/debugProtocolCustom.json +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_concurrency_analyser/__init__.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/.gitignore +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/__init__.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.pxd +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.pyx +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.template.pyx +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/release_mem.h +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/README.txt +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/__init__.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/README +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_ipython/__init__.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydev_sitecustomize/__not_in_default_pythonpath.txt +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/README.txt +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_custom_pyeval_settrace.hpp +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_custom_pyeval_settrace_310.hpp +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_custom_pyeval_settrace_311.hpp +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_custom_pyeval_settrace_common.hpp +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/py_settrace.hpp +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/python.h +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/common/ref_utils.hpp +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/.gitignore +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/attach.cpp +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/compile_linux.sh +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/compile_mac.sh +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/compile_manylinux.cmd +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/attach.h +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/inject_dll.cpp +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/py_win_helpers.hpp +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/run_code_in_memory.hpp +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/run_code_on_dllmain.cpp +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/stdafx.cpp +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/stdafx.h +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/windows/targetver.h +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/pydevd_plugins/extensions/README.md +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/adapter/__init__.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/adapter/__main__.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/adapter/clients.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/adapter/components.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/adapter/launchers.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/adapter/servers.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/adapter/sessions.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/common/__init__.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/common/json.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/common/log.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/common/singleton.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/common/sockets.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/common/stacks.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/common/timestamp.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/common/util.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/launcher/__init__.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/launcher/__main__.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/launcher/debuggee.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/launcher/handlers.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/launcher/output.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/launcher/winapi.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/public_api.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/server/__init__.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/server/api.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/server/attach_pid_injected.py +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy.egg-info/dependency_links.txt +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy.egg-info/entry_points.txt +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy.egg-info/top_level.txt +0 -0
- {debugpy-1.8.5 → debugpy-1.8.7}/versioneer.py +0 -0
{debugpy-1.8.5 → debugpy-1.8.7}/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.pyx
RENAMED
|
@@ -4,65 +4,74 @@ from __future__ import print_function
|
|
|
4
4
|
|
|
5
5
|
# DO NOT edit manually!
|
|
6
6
|
# DO NOT edit manually!
|
|
7
|
-
from _pydevd_bundle.pydevd_constants import (
|
|
8
|
-
|
|
7
|
+
from _pydevd_bundle.pydevd_constants import (
|
|
8
|
+
STATE_RUN,
|
|
9
|
+
PYTHON_SUSPEND,
|
|
10
|
+
SUPPORT_GEVENT,
|
|
11
|
+
ForkSafeLock,
|
|
12
|
+
_current_frames,
|
|
13
|
+
STATE_SUSPEND,
|
|
14
|
+
get_global_debugger,
|
|
15
|
+
get_thread_id,
|
|
16
|
+
)
|
|
9
17
|
from _pydev_bundle import pydev_log
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
# from _pydevd_bundle.pydevd_frame import PyDBFrame
|
|
14
|
-
# ENDIF
|
|
18
|
+
from _pydev_bundle._pydev_saved_modules import threading
|
|
19
|
+
from _pydev_bundle.pydev_is_thread_alive import is_thread_alive
|
|
20
|
+
import weakref
|
|
15
21
|
|
|
16
22
|
version = 11
|
|
17
23
|
|
|
18
24
|
|
|
19
|
-
|
|
25
|
+
# =======================================================================================================================
|
|
20
26
|
# PyDBAdditionalThreadInfo
|
|
21
|
-
|
|
27
|
+
# =======================================================================================================================
|
|
28
|
+
# fmt: off
|
|
22
29
|
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
23
30
|
cdef class PyDBAdditionalThreadInfo:
|
|
24
31
|
# ELSE
|
|
25
32
|
# class PyDBAdditionalThreadInfo(object):
|
|
26
33
|
# ENDIF
|
|
34
|
+
# fmt: on
|
|
27
35
|
|
|
28
36
|
# Note: the params in cython are declared in pydevd_cython.pxd.
|
|
37
|
+
# fmt: off
|
|
29
38
|
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
30
39
|
# ELSE
|
|
31
40
|
# __slots__ = [
|
|
32
|
-
#
|
|
33
|
-
#
|
|
34
|
-
#
|
|
35
|
-
#
|
|
36
|
-
#
|
|
37
|
-
#
|
|
38
|
-
#
|
|
39
|
-
#
|
|
40
|
-
#
|
|
41
|
-
#
|
|
42
|
-
#
|
|
43
|
-
#
|
|
44
|
-
#
|
|
45
|
-
#
|
|
46
|
-
#
|
|
47
|
-
#
|
|
48
|
-
#
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
#
|
|
52
|
-
#
|
|
41
|
+
# "pydev_state",
|
|
42
|
+
# "pydev_step_stop",
|
|
43
|
+
# "pydev_original_step_cmd",
|
|
44
|
+
# "pydev_step_cmd",
|
|
45
|
+
# "pydev_notify_kill",
|
|
46
|
+
# "pydev_django_resolve_frame",
|
|
47
|
+
# "pydev_call_from_jinja2",
|
|
48
|
+
# "pydev_call_inside_jinja2",
|
|
49
|
+
# "is_tracing",
|
|
50
|
+
# "conditional_breakpoint_exception",
|
|
51
|
+
# "pydev_message",
|
|
52
|
+
# "suspend_type",
|
|
53
|
+
# "pydev_next_line",
|
|
54
|
+
# "pydev_func_name",
|
|
55
|
+
# "suspended_at_unhandled",
|
|
56
|
+
# "trace_suspend_type",
|
|
57
|
+
# "top_level_thread_tracer_no_back_frames",
|
|
58
|
+
# "top_level_thread_tracer_unhandled",
|
|
59
|
+
# "thread_tracer",
|
|
60
|
+
# "step_in_initial_location",
|
|
53
61
|
# # Used for CMD_SMART_STEP_INTO (to know which smart step into variant to use)
|
|
54
|
-
#
|
|
55
|
-
#
|
|
56
|
-
#
|
|
62
|
+
# "pydev_smart_parent_offset",
|
|
63
|
+
# "pydev_smart_child_offset",
|
|
57
64
|
# # Used for CMD_SMART_STEP_INTO (list[_pydevd_bundle.pydevd_bytecode_utils.Variant])
|
|
58
65
|
# # Filled when the cmd_get_smart_step_into_variants is requested (so, this is a copy
|
|
59
66
|
# # of the last request for a given thread and pydev_smart_parent_offset/pydev_smart_child_offset relies on it).
|
|
60
|
-
#
|
|
61
|
-
#
|
|
62
|
-
#
|
|
63
|
-
#
|
|
67
|
+
# "pydev_smart_step_into_variants",
|
|
68
|
+
# "target_id_to_smart_step_into_variant",
|
|
69
|
+
# "pydev_use_scoped_step_frame",
|
|
70
|
+
# "weak_thread",
|
|
71
|
+
# "is_in_wait_loop",
|
|
64
72
|
# ]
|
|
65
73
|
# ENDIF
|
|
74
|
+
# fmt: on
|
|
66
75
|
|
|
67
76
|
def __init__(self):
|
|
68
77
|
self.pydev_state = STATE_RUN # STATE_RUN or STATE_SUSPEND
|
|
@@ -83,12 +92,12 @@ cdef class PyDBAdditionalThreadInfo:
|
|
|
83
92
|
self.pydev_call_inside_jinja2 = None
|
|
84
93
|
self.is_tracing = 0
|
|
85
94
|
self.conditional_breakpoint_exception = None
|
|
86
|
-
self.pydev_message =
|
|
95
|
+
self.pydev_message = ""
|
|
87
96
|
self.suspend_type = PYTHON_SUSPEND
|
|
88
97
|
self.pydev_next_line = -1
|
|
89
|
-
self.pydev_func_name =
|
|
98
|
+
self.pydev_func_name = ".invalid." # Must match the type in cython
|
|
90
99
|
self.suspended_at_unhandled = False
|
|
91
|
-
self.trace_suspend_type =
|
|
100
|
+
self.trace_suspend_type = "trace" # 'trace' or 'frame_eval'
|
|
92
101
|
self.top_level_thread_tracer_no_back_frames = []
|
|
93
102
|
self.top_level_thread_tracer_unhandled = None
|
|
94
103
|
self.thread_tracer = None
|
|
@@ -109,22 +118,80 @@ cdef class PyDBAdditionalThreadInfo:
|
|
|
109
118
|
#
|
|
110
119
|
# See: https://github.com/microsoft/debugpy/issues/869#issuecomment-1132141003
|
|
111
120
|
self.pydev_use_scoped_step_frame = False
|
|
121
|
+
self.weak_thread = None
|
|
122
|
+
|
|
123
|
+
# Purpose: detect if this thread is suspended and actually in the wait loop
|
|
124
|
+
# at this time (otherwise it may be suspended but still didn't reach a point.
|
|
125
|
+
# to pause).
|
|
126
|
+
self.is_in_wait_loop = False
|
|
127
|
+
|
|
128
|
+
# fmt: off
|
|
129
|
+
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
130
|
+
cpdef object _get_related_thread(self):
|
|
131
|
+
# ELSE
|
|
132
|
+
# def _get_related_thread(self):
|
|
133
|
+
# ENDIF
|
|
134
|
+
# fmt: on
|
|
135
|
+
if self.pydev_notify_kill: # Already killed
|
|
136
|
+
return None
|
|
137
|
+
|
|
138
|
+
if self.weak_thread is None:
|
|
139
|
+
return None
|
|
140
|
+
|
|
141
|
+
thread = self.weak_thread()
|
|
142
|
+
if thread is None:
|
|
143
|
+
return False
|
|
144
|
+
|
|
145
|
+
if not is_thread_alive(thread):
|
|
146
|
+
return None
|
|
147
|
+
|
|
148
|
+
if thread._ident is None: # Can this happen?
|
|
149
|
+
pydev_log.critical("thread._ident is None in _get_related_thread!")
|
|
150
|
+
return None
|
|
151
|
+
|
|
152
|
+
if threading._active.get(thread._ident) is not thread:
|
|
153
|
+
return None
|
|
112
154
|
|
|
113
|
-
|
|
114
|
-
|
|
155
|
+
return thread
|
|
156
|
+
|
|
157
|
+
# fmt: off
|
|
158
|
+
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
159
|
+
cpdef bint _is_stepping(self):
|
|
160
|
+
# ELSE
|
|
161
|
+
# def _is_stepping(self):
|
|
162
|
+
# ENDIF
|
|
163
|
+
# fmt: on
|
|
164
|
+
if self.pydev_state == STATE_RUN and self.pydev_step_cmd != -1:
|
|
165
|
+
# This means actually stepping in a step operation.
|
|
166
|
+
return True
|
|
167
|
+
|
|
168
|
+
if self.pydev_state == STATE_SUSPEND and self.is_in_wait_loop:
|
|
169
|
+
# This means stepping because it was suspended but still didn't
|
|
170
|
+
# reach a suspension point.
|
|
171
|
+
return True
|
|
172
|
+
|
|
173
|
+
return False
|
|
174
|
+
|
|
175
|
+
# fmt: off
|
|
176
|
+
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
177
|
+
cpdef get_topmost_frame(self, thread):
|
|
178
|
+
# ELSE
|
|
179
|
+
# def get_topmost_frame(self, thread):
|
|
180
|
+
# ENDIF
|
|
181
|
+
# fmt: on
|
|
182
|
+
"""
|
|
115
183
|
Gets the topmost frame for the given thread. Note that it may be None
|
|
116
184
|
and callers should remove the reference to the frame as soon as possible
|
|
117
185
|
to avoid disturbing user code.
|
|
118
|
-
|
|
186
|
+
"""
|
|
119
187
|
# sys._current_frames(): dictionary with thread id -> topmost frame
|
|
120
188
|
current_frames = _current_frames()
|
|
121
|
-
topmost_frame = current_frames.get(thread.
|
|
189
|
+
topmost_frame = current_frames.get(thread._ident)
|
|
122
190
|
if topmost_frame is None:
|
|
123
191
|
# Note: this is expected for dummy threads (so, getting the topmost frame should be
|
|
124
192
|
# treated as optional).
|
|
125
193
|
pydev_log.info(
|
|
126
|
-
|
|
127
|
-
'GEVENT_SUPPORT: %s',
|
|
194
|
+
"Unable to get topmost frame for thread: %s, thread.ident: %s, id(thread): %s\nCurrent frames: %s.\n" "GEVENT_SUPPORT: %s",
|
|
128
195
|
thread,
|
|
129
196
|
thread.ident,
|
|
130
197
|
id(thread),
|
|
@@ -134,15 +201,30 @@ cdef class PyDBAdditionalThreadInfo:
|
|
|
134
201
|
|
|
135
202
|
return topmost_frame
|
|
136
203
|
|
|
204
|
+
# fmt: off
|
|
205
|
+
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
206
|
+
cpdef update_stepping_info(self):
|
|
207
|
+
# ELSE
|
|
208
|
+
# def update_stepping_info(self):
|
|
209
|
+
# ENDIF
|
|
210
|
+
# fmt: on
|
|
211
|
+
_update_stepping_info(self)
|
|
212
|
+
|
|
137
213
|
def __str__(self):
|
|
138
|
-
return
|
|
139
|
-
self.pydev_state, self.pydev_step_stop, self.pydev_step_cmd, self.pydev_notify_kill)
|
|
214
|
+
return "State:%s Stop:%s Cmd: %s Kill:%s" % (self.pydev_state, self.pydev_step_stop, self.pydev_step_cmd, self.pydev_notify_kill)
|
|
140
215
|
|
|
141
216
|
|
|
142
217
|
_set_additional_thread_info_lock = ForkSafeLock()
|
|
218
|
+
_next_additional_info = [PyDBAdditionalThreadInfo()]
|
|
143
219
|
|
|
144
220
|
|
|
145
|
-
|
|
221
|
+
# fmt: off
|
|
222
|
+
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
223
|
+
cpdef set_additional_thread_info(thread):
|
|
224
|
+
# ELSE
|
|
225
|
+
# def set_additional_thread_info(thread):
|
|
226
|
+
# ENDIF
|
|
227
|
+
# fmt: on
|
|
146
228
|
try:
|
|
147
229
|
additional_info = thread.additional_info
|
|
148
230
|
if additional_info is None:
|
|
@@ -151,25 +233,125 @@ def set_additional_thread_info(thread):
|
|
|
151
233
|
with _set_additional_thread_info_lock:
|
|
152
234
|
# If it's not there, set it within a lock to avoid any racing
|
|
153
235
|
# conditions.
|
|
154
|
-
|
|
236
|
+
try:
|
|
237
|
+
additional_info = thread.additional_info
|
|
238
|
+
except:
|
|
239
|
+
additional_info = None
|
|
240
|
+
|
|
155
241
|
if additional_info is None:
|
|
156
|
-
|
|
157
|
-
|
|
242
|
+
# Note: don't call PyDBAdditionalThreadInfo constructor at this
|
|
243
|
+
# point as it can piggy-back into the debugger which could
|
|
244
|
+
# get here again, rather get the global ref which was pre-created
|
|
245
|
+
# and add a new entry only after we set thread.additional_info.
|
|
246
|
+
additional_info = _next_additional_info[0]
|
|
247
|
+
thread.additional_info = additional_info
|
|
248
|
+
additional_info.weak_thread = weakref.ref(thread)
|
|
249
|
+
add_additional_info(additional_info)
|
|
250
|
+
del _next_additional_info[:]
|
|
251
|
+
_next_additional_info.append(PyDBAdditionalThreadInfo())
|
|
158
252
|
|
|
159
253
|
return additional_info
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
# fmt: off
|
|
257
|
+
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
258
|
+
cdef set _all_infos
|
|
259
|
+
cdef set _infos_stepping
|
|
260
|
+
cdef object _update_infos_lock
|
|
261
|
+
# ELSE
|
|
262
|
+
# ENDIF
|
|
263
|
+
# fmt: on
|
|
264
|
+
|
|
265
|
+
_all_infos = set()
|
|
266
|
+
_infos_stepping = set()
|
|
267
|
+
_update_infos_lock = ForkSafeLock()
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
# fmt: off
|
|
271
|
+
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
272
|
+
cdef _update_stepping_info(PyDBAdditionalThreadInfo info):
|
|
273
|
+
# ELSE
|
|
274
|
+
# def _update_stepping_info(info):
|
|
275
|
+
# ENDIF
|
|
276
|
+
# fmt: on
|
|
277
|
+
|
|
278
|
+
global _infos_stepping
|
|
279
|
+
global _all_infos
|
|
280
|
+
|
|
281
|
+
with _update_infos_lock:
|
|
282
|
+
# Removes entries that are no longer valid.
|
|
283
|
+
new_all_infos = set()
|
|
284
|
+
for info in _all_infos:
|
|
285
|
+
if info._get_related_thread() is not None:
|
|
286
|
+
new_all_infos.add(info)
|
|
287
|
+
_all_infos = new_all_infos
|
|
288
|
+
|
|
289
|
+
new_stepping = set()
|
|
290
|
+
for info in _all_infos:
|
|
291
|
+
if info._is_stepping():
|
|
292
|
+
new_stepping.add(info)
|
|
293
|
+
_infos_stepping = new_stepping
|
|
294
|
+
|
|
295
|
+
py_db = get_global_debugger()
|
|
296
|
+
if py_db is not None and not py_db.pydb_disposed:
|
|
297
|
+
thread = info.weak_thread()
|
|
298
|
+
if thread is not None:
|
|
299
|
+
thread_id = get_thread_id(thread)
|
|
300
|
+
_queue, event = py_db.get_internal_queue_and_event(thread_id)
|
|
301
|
+
event.set()
|
|
302
|
+
|
|
303
|
+
# fmt: off
|
|
304
|
+
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
305
|
+
cpdef add_additional_info(PyDBAdditionalThreadInfo info):
|
|
306
|
+
# ELSE
|
|
307
|
+
# def add_additional_info(info):
|
|
308
|
+
# ENDIF
|
|
309
|
+
# fmt: on
|
|
310
|
+
with _update_infos_lock:
|
|
311
|
+
_all_infos.add(info)
|
|
312
|
+
if info._is_stepping():
|
|
313
|
+
_infos_stepping.add(info)
|
|
314
|
+
|
|
315
|
+
# fmt: off
|
|
316
|
+
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
317
|
+
cpdef remove_additional_info(PyDBAdditionalThreadInfo info):
|
|
318
|
+
# ELSE
|
|
319
|
+
# def remove_additional_info(info):
|
|
320
|
+
# ENDIF
|
|
321
|
+
# fmt: on
|
|
322
|
+
with _update_infos_lock:
|
|
323
|
+
_all_infos.discard(info)
|
|
324
|
+
_infos_stepping.discard(info)
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
# fmt: off
|
|
328
|
+
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
329
|
+
cpdef bint any_thread_stepping():
|
|
330
|
+
# ELSE
|
|
331
|
+
# def any_thread_stepping():
|
|
332
|
+
# ENDIF
|
|
333
|
+
# fmt: on
|
|
334
|
+
return bool(_infos_stepping)
|
|
160
335
|
import linecache
|
|
161
336
|
import os.path
|
|
162
337
|
import re
|
|
163
338
|
|
|
164
339
|
from _pydev_bundle import pydev_log
|
|
165
340
|
from _pydevd_bundle import pydevd_dont_trace
|
|
166
|
-
from _pydevd_bundle.pydevd_constants import (
|
|
167
|
-
|
|
341
|
+
from _pydevd_bundle.pydevd_constants import (
|
|
342
|
+
RETURN_VALUES_DICT,
|
|
343
|
+
NO_FTRACE,
|
|
344
|
+
EXCEPTION_TYPE_HANDLED,
|
|
345
|
+
EXCEPTION_TYPE_USER_UNHANDLED,
|
|
346
|
+
PYDEVD_IPYTHON_CONTEXT,
|
|
347
|
+
PYDEVD_USE_SYS_MONITORING,
|
|
348
|
+
)
|
|
168
349
|
from _pydevd_bundle.pydevd_frame_utils import add_exception_to_frame, just_raised, remove_exception_from_frame, ignore_exception_trace
|
|
169
350
|
from _pydevd_bundle.pydevd_utils import get_clsname_for_code
|
|
170
351
|
from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame
|
|
171
352
|
from _pydevd_bundle.pydevd_comm_constants import constant_to_str, CMD_SET_FUNCTION_BREAK
|
|
172
353
|
import sys
|
|
354
|
+
|
|
173
355
|
try:
|
|
174
356
|
from _pydevd_bundle.pydevd_bytecode_utils import get_smart_step_into_variant_from_frame_offset
|
|
175
357
|
except ImportError:
|
|
@@ -177,6 +359,7 @@ except ImportError:
|
|
|
177
359
|
def get_smart_step_into_variant_from_frame_offset(*args, **kwargs):
|
|
178
360
|
return None
|
|
179
361
|
|
|
362
|
+
|
|
180
363
|
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
181
364
|
# ELSE
|
|
182
365
|
# # Note: those are now inlined on cython.
|
|
@@ -196,10 +379,10 @@ except ImportError:
|
|
|
196
379
|
|
|
197
380
|
basename = os.path.basename
|
|
198
381
|
|
|
199
|
-
IGNORE_EXCEPTION_TAG = re.compile(
|
|
200
|
-
DEBUG_START = (
|
|
201
|
-
DEBUG_START_PY3K = (
|
|
202
|
-
TRACE_PROPERTY =
|
|
382
|
+
IGNORE_EXCEPTION_TAG = re.compile("[^#]*#.*@IgnoreException")
|
|
383
|
+
DEBUG_START = ("pydevd.py", "run")
|
|
384
|
+
DEBUG_START_PY3K = ("_pydev_execfile.py", "execfile")
|
|
385
|
+
TRACE_PROPERTY = "pydevd_traceproperty.py"
|
|
203
386
|
|
|
204
387
|
import dis
|
|
205
388
|
|
|
@@ -210,10 +393,10 @@ except NameError:
|
|
|
210
393
|
|
|
211
394
|
|
|
212
395
|
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
213
|
-
|
|
396
|
+
def is_unhandled_exception(container_obj, py_db, frame, int last_raise_line, set raise_lines):
|
|
214
397
|
# ELSE
|
|
215
398
|
# def is_unhandled_exception(container_obj, py_db, frame, last_raise_line, raise_lines):
|
|
216
|
-
# ENDIF
|
|
399
|
+
# ENDIF
|
|
217
400
|
if frame.f_lineno in raise_lines:
|
|
218
401
|
return True
|
|
219
402
|
|
|
@@ -242,10 +425,7 @@ cdef is_unhandled_exception(container_obj, py_db, frame, int last_raise_line, se
|
|
|
242
425
|
# and it's gotten in the except line.
|
|
243
426
|
for try_except_info in try_except_infos:
|
|
244
427
|
if try_except_info.is_line_in_except_block(frame.f_lineno):
|
|
245
|
-
if
|
|
246
|
-
frame.f_lineno == try_except_info.except_line or
|
|
247
|
-
frame.f_lineno in try_except_info.raise_lines_in_except
|
|
248
|
-
):
|
|
428
|
+
if frame.f_lineno == try_except_info.except_line or frame.f_lineno in try_except_info.raise_lines_in_except:
|
|
249
429
|
# In a raise inside a try..except block or some except which doesn't
|
|
250
430
|
# match the raised exception.
|
|
251
431
|
return True
|
|
@@ -259,33 +439,30 @@ cdef class _TryExceptContainerObj:
|
|
|
259
439
|
self.try_except_infos = None
|
|
260
440
|
# ELSE
|
|
261
441
|
# class _TryExceptContainerObj(object):
|
|
262
|
-
#
|
|
263
|
-
# A dumb container object just to
|
|
264
|
-
#
|
|
265
|
-
#
|
|
442
|
+
# """
|
|
443
|
+
# A dumb container object just to contain the try..except info when needed. Meant to be
|
|
444
|
+
# persistent among multiple PyDBFrames to the same code object.
|
|
445
|
+
# """
|
|
446
|
+
#
|
|
266
447
|
# try_except_infos = None
|
|
448
|
+
#
|
|
449
|
+
#
|
|
267
450
|
# ENDIF
|
|
268
451
|
|
|
269
452
|
|
|
270
|
-
|
|
453
|
+
# =======================================================================================================================
|
|
271
454
|
# PyDBFrame
|
|
272
|
-
|
|
455
|
+
# =======================================================================================================================
|
|
273
456
|
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
274
457
|
cdef class PyDBFrame:
|
|
275
458
|
# ELSE
|
|
276
459
|
# class PyDBFrame:
|
|
277
|
-
#
|
|
460
|
+
# """This makes the tracing for a given frame, so, the trace_dispatch
|
|
278
461
|
# is used initially when we enter into a new context ('call') and then
|
|
279
462
|
# is reused for the entire context.
|
|
280
|
-
#
|
|
281
|
-
#
|
|
282
|
-
|
|
283
|
-
# Note: class (and not instance) attributes.
|
|
284
|
-
|
|
285
|
-
# Same thing in the main debugger but only considering the file contents, while the one in the main debugger
|
|
286
|
-
# considers the user input (so, the actual result must be a join of both).
|
|
287
|
-
filename_to_lines_where_exceptions_are_ignored = {}
|
|
288
|
-
filename_to_stat_info = {}
|
|
463
|
+
# """
|
|
464
|
+
#
|
|
465
|
+
# ENDIF
|
|
289
466
|
|
|
290
467
|
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
291
468
|
cdef tuple _args
|
|
@@ -299,10 +476,17 @@ cdef class PyDBFrame:
|
|
|
299
476
|
# should_skip = -1 # Default value in class (put in instance on set).
|
|
300
477
|
# exc_info = () # Default value in class (put in instance on set).
|
|
301
478
|
#
|
|
302
|
-
#
|
|
303
|
-
#
|
|
304
|
-
#
|
|
305
|
-
#
|
|
479
|
+
# if PYDEVD_USE_SYS_MONITORING:
|
|
480
|
+
#
|
|
481
|
+
# def __init__(self, *args, **kwargs):
|
|
482
|
+
# raise RuntimeError("Not expected to be used in sys.monitoring.")
|
|
483
|
+
#
|
|
484
|
+
# else:
|
|
485
|
+
#
|
|
486
|
+
# def __init__(self, args):
|
|
487
|
+
# # args = py_db, abs_path_canonical_path_and_base, base, info, t, frame
|
|
488
|
+
# # yeap, much faster than putting in self and then getting it from self later on
|
|
489
|
+
# self._args = args
|
|
306
490
|
# ENDIF
|
|
307
491
|
|
|
308
492
|
def set_suspend(self, *args, **kwargs):
|
|
@@ -317,291 +501,42 @@ cdef class PyDBFrame:
|
|
|
317
501
|
cdef tuple exc_info;
|
|
318
502
|
# ELSE
|
|
319
503
|
# def trace_exception(self, frame, event, arg):
|
|
320
|
-
|
|
321
|
-
if event ==
|
|
322
|
-
should_stop, frame = self.
|
|
504
|
+
# ENDIF
|
|
505
|
+
if event == "exception":
|
|
506
|
+
should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info)
|
|
507
|
+
self.exc_info = exc_info
|
|
323
508
|
|
|
324
509
|
if should_stop:
|
|
325
|
-
if self.
|
|
510
|
+
if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED):
|
|
326
511
|
return self.trace_dispatch
|
|
327
512
|
|
|
328
|
-
elif event ==
|
|
513
|
+
elif event == "return":
|
|
329
514
|
exc_info = self.exc_info
|
|
330
515
|
if exc_info and arg is None:
|
|
331
516
|
frame_skips_cache, frame_cache_key = self._args[4], self._args[5]
|
|
332
|
-
custom_key = (frame_cache_key,
|
|
517
|
+
custom_key = (frame_cache_key, "try_exc_info")
|
|
333
518
|
container_obj = frame_skips_cache.get(custom_key)
|
|
334
519
|
if container_obj is None:
|
|
335
520
|
container_obj = frame_skips_cache[custom_key] = _TryExceptContainerObj()
|
|
336
|
-
if is_unhandled_exception(container_obj, self._args[0], frame, exc_info[1], exc_info[2]) and
|
|
337
|
-
|
|
521
|
+
if is_unhandled_exception(container_obj, self._args[0], frame, exc_info[1], exc_info[2]) and self.handle_user_exception(
|
|
522
|
+
frame
|
|
523
|
+
):
|
|
338
524
|
return self.trace_dispatch
|
|
339
525
|
|
|
340
526
|
return self.trace_exception
|
|
341
527
|
|
|
342
|
-
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
343
|
-
cdef _should_stop_on_exception(self, frame, str event, arg):
|
|
344
|
-
cdef PyDBAdditionalThreadInfo info;
|
|
345
|
-
cdef bint should_stop;
|
|
346
|
-
cdef bint was_just_raised;
|
|
347
|
-
cdef list check_excs;
|
|
348
|
-
# ELSE
|
|
349
|
-
# def _should_stop_on_exception(self, frame, event, arg):
|
|
350
|
-
# ENDIF
|
|
351
|
-
|
|
352
|
-
# main_debugger, _filename, info, _thread = self._args
|
|
353
|
-
main_debugger = self._args[0]
|
|
354
|
-
info = self._args[2]
|
|
355
|
-
should_stop = False
|
|
356
|
-
|
|
357
|
-
# 2 = 2
|
|
358
|
-
if info.pydev_state != 2: # and breakpoint is not None:
|
|
359
|
-
exception, value, trace = arg
|
|
360
|
-
|
|
361
|
-
if trace is not None and hasattr(trace, 'tb_next'):
|
|
362
|
-
# on jython trace is None on the first event and it may not have a tb_next.
|
|
363
|
-
|
|
364
|
-
should_stop = False
|
|
365
|
-
exception_breakpoint = None
|
|
366
|
-
try:
|
|
367
|
-
if main_debugger.plugin is not None:
|
|
368
|
-
result = main_debugger.plugin.exception_break(main_debugger, self, frame, self._args, arg)
|
|
369
|
-
if result:
|
|
370
|
-
should_stop, frame = result
|
|
371
|
-
except:
|
|
372
|
-
pydev_log.exception()
|
|
373
|
-
|
|
374
|
-
if not should_stop:
|
|
375
|
-
# Apply checks that don't need the exception breakpoint (where we shouldn't ever stop).
|
|
376
|
-
if exception == SystemExit and main_debugger.ignore_system_exit_code(value):
|
|
377
|
-
pass
|
|
378
|
-
|
|
379
|
-
elif exception in (GeneratorExit, StopIteration, StopAsyncIteration):
|
|
380
|
-
# These exceptions are control-flow related (they work as a generator
|
|
381
|
-
# pause), so, we shouldn't stop on them.
|
|
382
|
-
pass
|
|
383
|
-
|
|
384
|
-
elif ignore_exception_trace(trace):
|
|
385
|
-
pass
|
|
386
|
-
|
|
387
|
-
else:
|
|
388
|
-
was_just_raised = trace.tb_next is None
|
|
389
|
-
|
|
390
|
-
# It was not handled by any plugin, lets check exception breakpoints.
|
|
391
|
-
check_excs = []
|
|
392
|
-
|
|
393
|
-
# Note: check user unhandled before regular exceptions.
|
|
394
|
-
exc_break_user = main_debugger.get_exception_breakpoint(
|
|
395
|
-
exception, main_debugger.break_on_user_uncaught_exceptions)
|
|
396
|
-
if exc_break_user is not None:
|
|
397
|
-
check_excs.append((exc_break_user, True))
|
|
398
|
-
|
|
399
|
-
exc_break_caught = main_debugger.get_exception_breakpoint(
|
|
400
|
-
exception, main_debugger.break_on_caught_exceptions)
|
|
401
|
-
if exc_break_caught is not None:
|
|
402
|
-
check_excs.append((exc_break_caught, False))
|
|
403
|
-
|
|
404
|
-
for exc_break, is_user_uncaught in check_excs:
|
|
405
|
-
# Initially mark that it should stop and then go into exclusions.
|
|
406
|
-
should_stop = True
|
|
407
|
-
|
|
408
|
-
if main_debugger.exclude_exception_by_filter(exc_break, trace):
|
|
409
|
-
pydev_log.debug("Ignore exception %s in library %s -- (%s)" % (exception, frame.f_code.co_filename, frame.f_code.co_name))
|
|
410
|
-
should_stop = False
|
|
411
|
-
|
|
412
|
-
elif exc_break.condition is not None and \
|
|
413
|
-
not main_debugger.handle_breakpoint_condition(info, exc_break, frame):
|
|
414
|
-
should_stop = False
|
|
415
|
-
|
|
416
|
-
elif is_user_uncaught:
|
|
417
|
-
# Note: we don't stop here, we just collect the exc_info to use later on...
|
|
418
|
-
should_stop = False
|
|
419
|
-
if not main_debugger.apply_files_filter(frame, frame.f_code.co_filename, True) \
|
|
420
|
-
and (frame.f_back is None or main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)):
|
|
421
|
-
# User uncaught means that we're currently in user code but the code
|
|
422
|
-
# up the stack is library code.
|
|
423
|
-
exc_info = self.exc_info
|
|
424
|
-
if not exc_info:
|
|
425
|
-
exc_info = (arg, frame.f_lineno, set([frame.f_lineno]))
|
|
426
|
-
else:
|
|
427
|
-
lines = exc_info[2]
|
|
428
|
-
lines.add(frame.f_lineno)
|
|
429
|
-
exc_info = (arg, frame.f_lineno, lines)
|
|
430
|
-
self.exc_info = exc_info
|
|
431
|
-
else:
|
|
432
|
-
# I.e.: these are only checked if we're not dealing with user uncaught exceptions.
|
|
433
|
-
if exc_break.notify_on_first_raise_only and main_debugger.skip_on_exceptions_thrown_in_same_context \
|
|
434
|
-
and not was_just_raised and not just_raised(trace.tb_next):
|
|
435
|
-
# In this case we never stop if it was just raised, so, to know if it was the first we
|
|
436
|
-
# need to check if we're in the 2nd method.
|
|
437
|
-
should_stop = False # I.e.: we stop only when we're at the caller of a method that throws an exception
|
|
438
|
-
|
|
439
|
-
elif exc_break.notify_on_first_raise_only and not main_debugger.skip_on_exceptions_thrown_in_same_context \
|
|
440
|
-
and not was_just_raised:
|
|
441
|
-
should_stop = False # I.e.: we stop only when it was just raised
|
|
442
|
-
|
|
443
|
-
elif was_just_raised and main_debugger.skip_on_exceptions_thrown_in_same_context:
|
|
444
|
-
# Option: Don't break if an exception is caught in the same function from which it is thrown
|
|
445
|
-
should_stop = False
|
|
446
|
-
|
|
447
|
-
if should_stop:
|
|
448
|
-
exception_breakpoint = exc_break
|
|
449
|
-
try:
|
|
450
|
-
info.pydev_message = exc_break.qname
|
|
451
|
-
except:
|
|
452
|
-
info.pydev_message = exc_break.qname.encode('utf-8')
|
|
453
|
-
break
|
|
454
|
-
|
|
455
|
-
if should_stop:
|
|
456
|
-
# Always add exception to frame (must remove later after we proceed).
|
|
457
|
-
add_exception_to_frame(frame, (exception, value, trace))
|
|
458
|
-
|
|
459
|
-
if exception_breakpoint is not None and exception_breakpoint.expression is not None:
|
|
460
|
-
main_debugger.handle_breakpoint_expression(exception_breakpoint, info, frame)
|
|
461
|
-
|
|
462
|
-
return should_stop, frame
|
|
463
|
-
|
|
464
528
|
def handle_user_exception(self, frame):
|
|
465
529
|
exc_info = self.exc_info
|
|
466
530
|
if exc_info:
|
|
467
|
-
return self.
|
|
531
|
+
return handle_exception(self._args[0], self._args[3], frame, exc_info[0], EXCEPTION_TYPE_USER_UNHANDLED)
|
|
468
532
|
return False
|
|
469
533
|
|
|
470
|
-
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
471
|
-
cdef _handle_exception(self, frame, str event, arg, str exception_type):
|
|
472
|
-
cdef bint stopped;
|
|
473
|
-
cdef tuple abs_real_path_and_base;
|
|
474
|
-
cdef str absolute_filename;
|
|
475
|
-
cdef str canonical_normalized_filename;
|
|
476
|
-
cdef dict filename_to_lines_where_exceptions_are_ignored;
|
|
477
|
-
cdef dict lines_ignored;
|
|
478
|
-
cdef dict frame_id_to_frame;
|
|
479
|
-
cdef dict merged;
|
|
480
|
-
cdef object trace_obj;
|
|
481
|
-
cdef object main_debugger;
|
|
482
|
-
# ELSE
|
|
483
|
-
# def _handle_exception(self, frame, event, arg, exception_type):
|
|
484
|
-
# ENDIF
|
|
485
|
-
stopped = False
|
|
486
|
-
try:
|
|
487
|
-
# print('_handle_exception', frame.f_lineno, frame.f_code.co_name)
|
|
488
|
-
|
|
489
|
-
# We have 3 things in arg: exception type, description, traceback object
|
|
490
|
-
trace_obj = arg[2]
|
|
491
|
-
main_debugger = self._args[0]
|
|
492
|
-
|
|
493
|
-
initial_trace_obj = trace_obj
|
|
494
|
-
if trace_obj.tb_next is None and trace_obj.tb_frame is frame:
|
|
495
|
-
# I.e.: tb_next should be only None in the context it was thrown (trace_obj.tb_frame is frame is just a double check).
|
|
496
|
-
pass
|
|
497
|
-
else:
|
|
498
|
-
# Get the trace_obj from where the exception was raised...
|
|
499
|
-
while trace_obj.tb_next is not None:
|
|
500
|
-
trace_obj = trace_obj.tb_next
|
|
501
|
-
|
|
502
|
-
if main_debugger.ignore_exceptions_thrown_in_lines_with_ignore_exception:
|
|
503
|
-
for check_trace_obj in (initial_trace_obj, trace_obj):
|
|
504
|
-
abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame)
|
|
505
|
-
absolute_filename = abs_real_path_and_base[0]
|
|
506
|
-
canonical_normalized_filename = abs_real_path_and_base[1]
|
|
507
|
-
|
|
508
|
-
filename_to_lines_where_exceptions_are_ignored = self.filename_to_lines_where_exceptions_are_ignored
|
|
509
|
-
|
|
510
|
-
lines_ignored = filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename)
|
|
511
|
-
if lines_ignored is None:
|
|
512
|
-
lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {}
|
|
513
|
-
|
|
514
|
-
try:
|
|
515
|
-
curr_stat = os.stat(absolute_filename)
|
|
516
|
-
curr_stat = (curr_stat.st_size, curr_stat.st_mtime)
|
|
517
|
-
except:
|
|
518
|
-
curr_stat = None
|
|
519
|
-
|
|
520
|
-
last_stat = self.filename_to_stat_info.get(absolute_filename)
|
|
521
|
-
if last_stat != curr_stat:
|
|
522
|
-
self.filename_to_stat_info[absolute_filename] = curr_stat
|
|
523
|
-
lines_ignored.clear()
|
|
524
|
-
try:
|
|
525
|
-
linecache.checkcache(absolute_filename)
|
|
526
|
-
except:
|
|
527
|
-
pydev_log.exception('Error in linecache.checkcache(%r)', absolute_filename)
|
|
528
|
-
|
|
529
|
-
from_user_input = main_debugger.filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename)
|
|
530
|
-
if from_user_input:
|
|
531
|
-
merged = {}
|
|
532
|
-
merged.update(lines_ignored)
|
|
533
|
-
# Override what we have with the related entries that the user entered
|
|
534
|
-
merged.update(from_user_input)
|
|
535
|
-
else:
|
|
536
|
-
merged = lines_ignored
|
|
537
|
-
|
|
538
|
-
exc_lineno = check_trace_obj.tb_lineno
|
|
539
|
-
|
|
540
|
-
# print ('lines ignored', lines_ignored)
|
|
541
|
-
# print ('user input', from_user_input)
|
|
542
|
-
# print ('merged', merged, 'curr', exc_lineno)
|
|
543
|
-
|
|
544
|
-
if exc_lineno not in merged: # Note: check on merged but update lines_ignored.
|
|
545
|
-
try:
|
|
546
|
-
line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals)
|
|
547
|
-
except:
|
|
548
|
-
pydev_log.exception('Error in linecache.getline(%r, %s, f_globals)', absolute_filename, exc_lineno)
|
|
549
|
-
line = ''
|
|
550
|
-
|
|
551
|
-
if IGNORE_EXCEPTION_TAG.match(line) is not None:
|
|
552
|
-
lines_ignored[exc_lineno] = 1
|
|
553
|
-
return False
|
|
554
|
-
else:
|
|
555
|
-
# Put in the cache saying not to ignore
|
|
556
|
-
lines_ignored[exc_lineno] = 0
|
|
557
|
-
else:
|
|
558
|
-
# Ok, dict has it already cached, so, let's check it...
|
|
559
|
-
if merged.get(exc_lineno, 0):
|
|
560
|
-
return False
|
|
561
|
-
|
|
562
|
-
thread = self._args[3]
|
|
563
|
-
|
|
564
|
-
try:
|
|
565
|
-
frame_id_to_frame = {}
|
|
566
|
-
frame_id_to_frame[id(frame)] = frame
|
|
567
|
-
f = trace_obj.tb_frame
|
|
568
|
-
while f is not None:
|
|
569
|
-
frame_id_to_frame[id(f)] = f
|
|
570
|
-
f = f.f_back
|
|
571
|
-
f = None
|
|
572
|
-
|
|
573
|
-
stopped = True
|
|
574
|
-
main_debugger.send_caught_exception_stack(thread, arg, id(frame))
|
|
575
|
-
try:
|
|
576
|
-
self.set_suspend(thread, 137)
|
|
577
|
-
self.do_wait_suspend(thread, frame, event, arg, exception_type=exception_type)
|
|
578
|
-
finally:
|
|
579
|
-
main_debugger.send_caught_exception_stack_proceeded(thread)
|
|
580
|
-
except:
|
|
581
|
-
pydev_log.exception()
|
|
582
|
-
|
|
583
|
-
main_debugger.set_trace_for_frame_and_parents(frame)
|
|
584
|
-
finally:
|
|
585
|
-
# Make sure the user cannot see the '__exception__' we added after we leave the suspend state.
|
|
586
|
-
remove_exception_from_frame(frame)
|
|
587
|
-
# Clear some local variables...
|
|
588
|
-
frame = None
|
|
589
|
-
trace_obj = None
|
|
590
|
-
initial_trace_obj = None
|
|
591
|
-
check_trace_obj = None
|
|
592
|
-
f = None
|
|
593
|
-
frame_id_to_frame = None
|
|
594
|
-
main_debugger = None
|
|
595
|
-
thread = None
|
|
596
|
-
|
|
597
|
-
return stopped
|
|
598
|
-
|
|
599
534
|
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
600
535
|
cdef get_func_name(self, frame):
|
|
601
536
|
cdef str func_name
|
|
602
537
|
# ELSE
|
|
603
538
|
# def get_func_name(self, frame):
|
|
604
|
-
|
|
539
|
+
# ENDIF
|
|
605
540
|
code_obj = frame.f_code
|
|
606
541
|
func_name = code_obj.co_name
|
|
607
542
|
try:
|
|
@@ -618,7 +553,7 @@ cdef class PyDBFrame:
|
|
|
618
553
|
cdef _show_return_values(self, frame, arg):
|
|
619
554
|
# ELSE
|
|
620
555
|
# def _show_return_values(self, frame, arg):
|
|
621
|
-
|
|
556
|
+
# ENDIF
|
|
622
557
|
try:
|
|
623
558
|
try:
|
|
624
559
|
f_locals_back = getattr(frame.f_back, "f_locals", None)
|
|
@@ -635,10 +570,10 @@ cdef class PyDBFrame:
|
|
|
635
570
|
f_locals_back = None
|
|
636
571
|
|
|
637
572
|
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
638
|
-
cdef _remove_return_values(self,
|
|
573
|
+
cdef _remove_return_values(self, py_db, frame):
|
|
639
574
|
# ELSE
|
|
640
|
-
# def _remove_return_values(self,
|
|
641
|
-
|
|
575
|
+
# def _remove_return_values(self, py_db, frame):
|
|
576
|
+
# ENDIF
|
|
642
577
|
try:
|
|
643
578
|
try:
|
|
644
579
|
# Showing return values was turned off, we should remove them from locals dict.
|
|
@@ -654,17 +589,17 @@ cdef class PyDBFrame:
|
|
|
654
589
|
f_locals_back = None
|
|
655
590
|
|
|
656
591
|
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
657
|
-
cdef _get_unfiltered_back_frame(self,
|
|
592
|
+
cdef _get_unfiltered_back_frame(self, py_db, frame):
|
|
658
593
|
# ELSE
|
|
659
|
-
# def _get_unfiltered_back_frame(self,
|
|
660
|
-
|
|
594
|
+
# def _get_unfiltered_back_frame(self, py_db, frame):
|
|
595
|
+
# ENDIF
|
|
661
596
|
f = frame.f_back
|
|
662
597
|
while f is not None:
|
|
663
|
-
if not
|
|
598
|
+
if not py_db.is_files_filter_enabled:
|
|
664
599
|
return f
|
|
665
600
|
|
|
666
601
|
else:
|
|
667
|
-
if
|
|
602
|
+
if py_db.apply_files_filter(f, f.f_code.co_filename, False):
|
|
668
603
|
f = f.f_back
|
|
669
604
|
|
|
670
605
|
else:
|
|
@@ -677,7 +612,7 @@ cdef class PyDBFrame:
|
|
|
677
612
|
cdef PyDBAdditionalThreadInfo info;
|
|
678
613
|
# ELSE
|
|
679
614
|
# def _is_same_frame(self, target_frame, current_frame):
|
|
680
|
-
|
|
615
|
+
# ENDIF
|
|
681
616
|
if target_frame is current_frame:
|
|
682
617
|
return True
|
|
683
618
|
|
|
@@ -729,7 +664,7 @@ cdef class PyDBFrame:
|
|
|
729
664
|
cdef tuple pydev_smart_step_into_variants
|
|
730
665
|
# ELSE
|
|
731
666
|
# def trace_dispatch(self, frame, event, arg):
|
|
732
|
-
|
|
667
|
+
# ENDIF
|
|
733
668
|
# Note: this is a big function because most of the logic related to hitting a breakpoint and
|
|
734
669
|
# stepping is contained in it. Ideally this could be split among multiple functions, but the
|
|
735
670
|
# problem in this case is that in pure-python function calls are expensive and even more so
|
|
@@ -739,8 +674,8 @@ cdef class PyDBFrame:
|
|
|
739
674
|
# generation be better split among what each part does).
|
|
740
675
|
|
|
741
676
|
try:
|
|
742
|
-
# DEBUG = '
|
|
743
|
-
|
|
677
|
+
# DEBUG = '_debugger_case_yield_from.py' in frame.f_code.co_filename
|
|
678
|
+
py_db, abs_path_canonical_path_and_base, info, thread, frame_skips_cache, frame_cache_key = self._args
|
|
744
679
|
# if DEBUG: print('frame trace_dispatch %s %s %s %s %s %s, stop: %s' % (frame.f_lineno, frame.f_code.co_name, frame.f_code.co_filename, event, constant_to_str(info.pydev_step_cmd), arg, info.pydev_step_stop))
|
|
745
680
|
info.is_tracing += 1
|
|
746
681
|
|
|
@@ -750,36 +685,35 @@ cdef class PyDBFrame:
|
|
|
750
685
|
line = frame.f_lineno or 0 # Workaround or case where frame.f_lineno is None
|
|
751
686
|
line_cache_key = (frame_cache_key, line)
|
|
752
687
|
|
|
753
|
-
if
|
|
754
|
-
return None if event ==
|
|
688
|
+
if py_db.pydb_disposed:
|
|
689
|
+
return None if event == "call" else NO_FTRACE
|
|
755
690
|
|
|
756
|
-
plugin_manager =
|
|
691
|
+
plugin_manager = py_db.plugin
|
|
757
692
|
has_exception_breakpoints = (
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
or main_debugger.has_plugin_exception_breaks)
|
|
693
|
+
py_db.break_on_caught_exceptions or py_db.break_on_user_uncaught_exceptions or py_db.has_plugin_exception_breaks
|
|
694
|
+
)
|
|
761
695
|
|
|
762
696
|
stop_frame = info.pydev_step_stop
|
|
763
697
|
step_cmd = info.pydev_step_cmd
|
|
764
698
|
function_breakpoint_on_call_event = None
|
|
765
699
|
|
|
766
|
-
if frame.f_code.co_flags &
|
|
700
|
+
if frame.f_code.co_flags & 0xA0: # 0xa0 == CO_GENERATOR = 0x20 | CO_COROUTINE = 0x80
|
|
767
701
|
# Dealing with coroutines and generators:
|
|
768
702
|
# When in a coroutine we change the perceived event to the debugger because
|
|
769
703
|
# a call, StopIteration exception and return are usually just pausing/unpausing it.
|
|
770
|
-
if event ==
|
|
704
|
+
if event == "line":
|
|
771
705
|
is_line = True
|
|
772
706
|
is_call = False
|
|
773
707
|
is_return = False
|
|
774
708
|
is_exception_event = False
|
|
775
709
|
|
|
776
|
-
elif event ==
|
|
710
|
+
elif event == "return":
|
|
777
711
|
is_line = False
|
|
778
712
|
is_call = False
|
|
779
713
|
is_return = True
|
|
780
714
|
is_exception_event = False
|
|
781
715
|
|
|
782
|
-
returns_cache_key = (frame_cache_key,
|
|
716
|
+
returns_cache_key = (frame_cache_key, "returns")
|
|
783
717
|
return_lines = frame_skips_cache.get(returns_cache_key)
|
|
784
718
|
if return_lines is None:
|
|
785
719
|
# Note: we're collecting the return lines by inspecting the bytecode as
|
|
@@ -787,7 +721,7 @@ cdef class PyDBFrame:
|
|
|
787
721
|
# it doesn't give any clear indication when a coroutine or generator is
|
|
788
722
|
# finishing or just pausing.
|
|
789
723
|
return_lines = set()
|
|
790
|
-
for x in
|
|
724
|
+
for x in py_db.collect_return_info(frame.f_code):
|
|
791
725
|
# Note: cython does not support closures in cpdefs (so we can't use
|
|
792
726
|
# a list comprehension).
|
|
793
727
|
return_lines.add(x.return_line)
|
|
@@ -820,7 +754,7 @@ cdef class PyDBFrame:
|
|
|
820
754
|
# frame in this case).
|
|
821
755
|
if stop_frame is frame and not info.pydev_use_scoped_step_frame:
|
|
822
756
|
if step_cmd in (108, 159, 107, 144):
|
|
823
|
-
f = self._get_unfiltered_back_frame(
|
|
757
|
+
f = self._get_unfiltered_back_frame(py_db, frame)
|
|
824
758
|
if f is not None:
|
|
825
759
|
info.pydev_step_cmd = 206
|
|
826
760
|
info.pydev_step_stop = f
|
|
@@ -835,19 +769,22 @@ cdef class PyDBFrame:
|
|
|
835
769
|
|
|
836
770
|
elif step_cmd == 206:
|
|
837
771
|
# We're exiting this one, so, mark the new coroutine context.
|
|
838
|
-
f = self._get_unfiltered_back_frame(
|
|
772
|
+
f = self._get_unfiltered_back_frame(py_db, frame)
|
|
839
773
|
if f is not None:
|
|
840
774
|
info.pydev_step_stop = f
|
|
841
775
|
else:
|
|
842
776
|
info.pydev_step_cmd = 107
|
|
843
777
|
info.pydev_step_stop = None
|
|
844
778
|
|
|
845
|
-
elif event ==
|
|
779
|
+
elif event == "exception":
|
|
846
780
|
breakpoints_for_file = None
|
|
847
781
|
if has_exception_breakpoints:
|
|
848
|
-
should_stop, frame =
|
|
782
|
+
should_stop, frame, exc_info = should_stop_on_exception(
|
|
783
|
+
self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info
|
|
784
|
+
)
|
|
785
|
+
self.exc_info = exc_info
|
|
849
786
|
if should_stop:
|
|
850
|
-
if self.
|
|
787
|
+
if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED):
|
|
851
788
|
return self.trace_dispatch
|
|
852
789
|
|
|
853
790
|
return self.trace_dispatch
|
|
@@ -856,13 +793,13 @@ cdef class PyDBFrame:
|
|
|
856
793
|
return self.trace_dispatch
|
|
857
794
|
|
|
858
795
|
else: # Not coroutine nor generator
|
|
859
|
-
if event ==
|
|
796
|
+
if event == "line":
|
|
860
797
|
is_line = True
|
|
861
798
|
is_call = False
|
|
862
799
|
is_return = False
|
|
863
800
|
is_exception_event = False
|
|
864
801
|
|
|
865
|
-
elif event ==
|
|
802
|
+
elif event == "return":
|
|
866
803
|
is_line = False
|
|
867
804
|
is_return = True
|
|
868
805
|
is_call = False
|
|
@@ -875,11 +812,12 @@ cdef class PyDBFrame:
|
|
|
875
812
|
# Note: this is especially troublesome when we're skipping code with the
|
|
876
813
|
# @DontTrace comment.
|
|
877
814
|
if (
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
815
|
+
stop_frame is frame
|
|
816
|
+
and not info.pydev_use_scoped_step_frame
|
|
817
|
+
and is_return
|
|
818
|
+
and step_cmd
|
|
819
|
+
in (108, 109, 159, 160, 128)
|
|
820
|
+
):
|
|
883
821
|
if step_cmd in (108, 109, 128):
|
|
884
822
|
info.pydev_step_cmd = 107
|
|
885
823
|
else:
|
|
@@ -890,21 +828,24 @@ cdef class PyDBFrame:
|
|
|
890
828
|
if self.handle_user_exception(frame):
|
|
891
829
|
return self.trace_dispatch
|
|
892
830
|
|
|
893
|
-
elif event ==
|
|
831
|
+
elif event == "call":
|
|
894
832
|
is_line = False
|
|
895
833
|
is_call = True
|
|
896
834
|
is_return = False
|
|
897
835
|
is_exception_event = False
|
|
898
836
|
if frame.f_code.co_firstlineno == frame.f_lineno: # Check line to deal with async/await.
|
|
899
|
-
function_breakpoint_on_call_event =
|
|
837
|
+
function_breakpoint_on_call_event = py_db.function_breakpoint_name_to_breakpoint.get(frame.f_code.co_name)
|
|
900
838
|
|
|
901
|
-
elif event ==
|
|
839
|
+
elif event == "exception":
|
|
902
840
|
is_exception_event = True
|
|
903
841
|
breakpoints_for_file = None
|
|
904
842
|
if has_exception_breakpoints:
|
|
905
|
-
should_stop, frame =
|
|
843
|
+
should_stop, frame, exc_info = should_stop_on_exception(
|
|
844
|
+
self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info
|
|
845
|
+
)
|
|
846
|
+
self.exc_info = exc_info
|
|
906
847
|
if should_stop:
|
|
907
|
-
if self.
|
|
848
|
+
if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED):
|
|
908
849
|
return self.trace_dispatch
|
|
909
850
|
is_line = False
|
|
910
851
|
is_return = False
|
|
@@ -915,7 +856,7 @@ cdef class PyDBFrame:
|
|
|
915
856
|
return self.trace_dispatch
|
|
916
857
|
|
|
917
858
|
if not is_exception_event:
|
|
918
|
-
breakpoints_for_file =
|
|
859
|
+
breakpoints_for_file = py_db.breakpoints.get(abs_path_canonical_path_and_base[1])
|
|
919
860
|
|
|
920
861
|
can_skip = False
|
|
921
862
|
|
|
@@ -927,22 +868,27 @@ cdef class PyDBFrame:
|
|
|
927
868
|
if step_cmd == -1:
|
|
928
869
|
can_skip = True
|
|
929
870
|
|
|
930
|
-
elif step_cmd in (
|
|
871
|
+
elif step_cmd in (
|
|
872
|
+
108,
|
|
873
|
+
109,
|
|
874
|
+
159,
|
|
875
|
+
160,
|
|
876
|
+
) and not self._is_same_frame(stop_frame, frame):
|
|
931
877
|
can_skip = True
|
|
932
878
|
|
|
933
879
|
elif step_cmd == 128 and (
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
880
|
+
stop_frame is not None
|
|
881
|
+
and stop_frame is not frame
|
|
882
|
+
and stop_frame is not frame.f_back
|
|
883
|
+
and (frame.f_back is None or stop_frame is not frame.f_back.f_back)
|
|
884
|
+
):
|
|
938
885
|
can_skip = True
|
|
939
886
|
|
|
940
887
|
elif step_cmd == 144:
|
|
941
|
-
if (
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
can_skip = True
|
|
888
|
+
if py_db.apply_files_filter(frame, frame.f_code.co_filename, True) and (
|
|
889
|
+
frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)
|
|
890
|
+
):
|
|
891
|
+
can_skip = True
|
|
946
892
|
|
|
947
893
|
elif step_cmd == 206:
|
|
948
894
|
f = frame
|
|
@@ -954,11 +900,15 @@ cdef class PyDBFrame:
|
|
|
954
900
|
can_skip = True
|
|
955
901
|
|
|
956
902
|
if can_skip:
|
|
957
|
-
if plugin_manager is not None and (
|
|
958
|
-
|
|
959
|
-
can_skip = plugin_manager.can_skip(main_debugger, frame)
|
|
903
|
+
if plugin_manager is not None and (py_db.has_plugin_line_breaks or py_db.has_plugin_exception_breaks):
|
|
904
|
+
can_skip = plugin_manager.can_skip(py_db, frame)
|
|
960
905
|
|
|
961
|
-
if
|
|
906
|
+
if (
|
|
907
|
+
can_skip
|
|
908
|
+
and py_db.show_return_values
|
|
909
|
+
and info.pydev_step_cmd in (108, 159)
|
|
910
|
+
and self._is_same_frame(stop_frame, frame.f_back)
|
|
911
|
+
):
|
|
962
912
|
# trace function for showing return values after step over
|
|
963
913
|
can_skip = False
|
|
964
914
|
|
|
@@ -1006,12 +956,12 @@ cdef class PyDBFrame:
|
|
|
1006
956
|
curr_func_name = frame.f_code.co_name
|
|
1007
957
|
|
|
1008
958
|
# global context is set with an empty name
|
|
1009
|
-
if curr_func_name in (
|
|
1010
|
-
curr_func_name =
|
|
959
|
+
if curr_func_name in ("?", "<module>", "<lambda>"):
|
|
960
|
+
curr_func_name = ""
|
|
1011
961
|
|
|
1012
962
|
for bp in breakpoints_for_file.values():
|
|
1013
963
|
# will match either global or some function
|
|
1014
|
-
if bp.func_name in (
|
|
964
|
+
if bp.func_name in ("None", curr_func_name):
|
|
1015
965
|
has_breakpoint_in_frame = True
|
|
1016
966
|
break
|
|
1017
967
|
else:
|
|
@@ -1057,26 +1007,29 @@ cdef class PyDBFrame:
|
|
|
1057
1007
|
new_frame = frame
|
|
1058
1008
|
stop = True
|
|
1059
1009
|
|
|
1060
|
-
elif plugin_manager is not None and
|
|
1061
|
-
result = plugin_manager.get_breakpoint(
|
|
1010
|
+
elif plugin_manager is not None and py_db.has_plugin_line_breaks:
|
|
1011
|
+
result = plugin_manager.get_breakpoint(py_db, frame, event, self._args[2])
|
|
1062
1012
|
if result:
|
|
1063
|
-
stop_on_plugin_breakpoint
|
|
1013
|
+
stop_on_plugin_breakpoint = True
|
|
1014
|
+
breakpoint, new_frame, bp_type = result
|
|
1064
1015
|
|
|
1065
1016
|
if breakpoint:
|
|
1066
1017
|
# ok, hit breakpoint, now, we have to discover if it is a conditional breakpoint
|
|
1067
1018
|
# lets do the conditional stuff here
|
|
1068
1019
|
if breakpoint.expression is not None:
|
|
1069
|
-
|
|
1020
|
+
py_db.handle_breakpoint_expression(breakpoint, info, new_frame)
|
|
1070
1021
|
|
|
1071
1022
|
if stop or stop_on_plugin_breakpoint:
|
|
1072
1023
|
eval_result = False
|
|
1073
1024
|
if breakpoint.has_condition:
|
|
1074
|
-
eval_result =
|
|
1025
|
+
eval_result = py_db.handle_breakpoint_condition(info, breakpoint, new_frame)
|
|
1075
1026
|
if not eval_result:
|
|
1076
1027
|
stop = False
|
|
1077
1028
|
stop_on_plugin_breakpoint = False
|
|
1078
1029
|
|
|
1079
|
-
if is_call and (
|
|
1030
|
+
if is_call and (
|
|
1031
|
+
frame.f_code.co_name in ("<lambda>", "<module>") or (line == 1 and frame.f_code.co_name.startswith("<cell"))
|
|
1032
|
+
):
|
|
1080
1033
|
# If we find a call for a module, it means that the module is being imported/executed for the
|
|
1081
1034
|
# first time. In this case we have to ignore this hit as it may later duplicated by a
|
|
1082
1035
|
# line event at the same place (so, if there's a module with a print() in the first line
|
|
@@ -1096,27 +1049,30 @@ cdef class PyDBFrame:
|
|
|
1096
1049
|
stop_on_plugin_breakpoint = False
|
|
1097
1050
|
|
|
1098
1051
|
if info.pydev_message is not None and len(info.pydev_message) > 0:
|
|
1099
|
-
cmd =
|
|
1100
|
-
|
|
1052
|
+
cmd = py_db.cmd_factory.make_io_message(info.pydev_message + os.linesep, "1")
|
|
1053
|
+
py_db.writer.add_command(cmd)
|
|
1101
1054
|
|
|
1102
|
-
if
|
|
1055
|
+
if py_db.show_return_values:
|
|
1103
1056
|
if is_return and (
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
(
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1057
|
+
(
|
|
1058
|
+
info.pydev_step_cmd in (108, 159, 128)
|
|
1059
|
+
and (self._is_same_frame(stop_frame, frame.f_back))
|
|
1060
|
+
)
|
|
1061
|
+
or (info.pydev_step_cmd in (109, 160) and (self._is_same_frame(stop_frame, frame)))
|
|
1062
|
+
or (info.pydev_step_cmd in (107, 206))
|
|
1063
|
+
or (
|
|
1064
|
+
info.pydev_step_cmd == 144
|
|
1065
|
+
and frame.f_back is not None
|
|
1066
|
+
and not py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)
|
|
1067
|
+
)
|
|
1068
|
+
):
|
|
1113
1069
|
self._show_return_values(frame, arg)
|
|
1114
1070
|
|
|
1115
|
-
elif
|
|
1071
|
+
elif py_db.remove_return_values_flag:
|
|
1116
1072
|
try:
|
|
1117
|
-
self._remove_return_values(
|
|
1073
|
+
self._remove_return_values(py_db, frame)
|
|
1118
1074
|
finally:
|
|
1119
|
-
|
|
1075
|
+
py_db.remove_return_values_flag = False
|
|
1120
1076
|
|
|
1121
1077
|
if stop:
|
|
1122
1078
|
self.set_suspend(
|
|
@@ -1126,7 +1082,7 @@ cdef class PyDBFrame:
|
|
|
1126
1082
|
)
|
|
1127
1083
|
|
|
1128
1084
|
elif stop_on_plugin_breakpoint and plugin_manager is not None:
|
|
1129
|
-
result = plugin_manager.suspend(
|
|
1085
|
+
result = plugin_manager.suspend(py_db, thread, frame, bp_type)
|
|
1130
1086
|
if result:
|
|
1131
1087
|
frame = result
|
|
1132
1088
|
|
|
@@ -1143,9 +1099,14 @@ cdef class PyDBFrame:
|
|
|
1143
1099
|
# Unfortunately Python itself stops the tracing when it originates from
|
|
1144
1100
|
# the tracing function, so, we can't do much about it (just let the user know).
|
|
1145
1101
|
exc = sys.exc_info()[0]
|
|
1146
|
-
cmd =
|
|
1147
|
-
|
|
1148
|
-
|
|
1102
|
+
cmd = py_db.cmd_factory.make_console_message(
|
|
1103
|
+
"%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n"
|
|
1104
|
+
% (
|
|
1105
|
+
exc,
|
|
1106
|
+
thread,
|
|
1107
|
+
)
|
|
1108
|
+
)
|
|
1109
|
+
py_db.writer.add_command(cmd)
|
|
1149
1110
|
if not issubclass(exc, (KeyboardInterrupt, SystemExit)):
|
|
1150
1111
|
pydev_log.exception()
|
|
1151
1112
|
|
|
@@ -1159,7 +1120,7 @@ cdef class PyDBFrame:
|
|
|
1159
1120
|
# I.e.: cache the result on self.should_skip (no need to evaluate the same frame multiple times).
|
|
1160
1121
|
# Note that on a code reload, we won't re-evaluate this because in practice, the frame.f_code
|
|
1161
1122
|
# Which will be handled by this frame is read-only, so, we can cache it safely.
|
|
1162
|
-
if not pydevd_dont_trace.should_trace_hook(frame, abs_path_canonical_path_and_base[0]):
|
|
1123
|
+
if not pydevd_dont_trace.should_trace_hook(frame.f_code, abs_path_canonical_path_and_base[0]):
|
|
1163
1124
|
# -1, 0, 1 to be Cython-friendly
|
|
1164
1125
|
should_skip = self.should_skip = 1
|
|
1165
1126
|
else:
|
|
@@ -1175,19 +1136,19 @@ cdef class PyDBFrame:
|
|
|
1175
1136
|
force_check_project_scope = step_cmd == 144
|
|
1176
1137
|
if is_line:
|
|
1177
1138
|
if not info.pydev_use_scoped_step_frame:
|
|
1178
|
-
if force_check_project_scope or
|
|
1179
|
-
stop = not
|
|
1139
|
+
if force_check_project_scope or py_db.is_files_filter_enabled:
|
|
1140
|
+
stop = not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope)
|
|
1180
1141
|
else:
|
|
1181
1142
|
stop = True
|
|
1182
1143
|
else:
|
|
1183
|
-
if force_check_project_scope or
|
|
1144
|
+
if force_check_project_scope or py_db.is_files_filter_enabled:
|
|
1184
1145
|
# Make sure we check the filtering inside ipython calls too...
|
|
1185
|
-
if not not
|
|
1146
|
+
if not not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope):
|
|
1186
1147
|
return None if is_call else NO_FTRACE
|
|
1187
1148
|
|
|
1188
1149
|
# We can only stop inside the ipython call.
|
|
1189
1150
|
filename = frame.f_code.co_filename
|
|
1190
|
-
if filename.endswith(
|
|
1151
|
+
if filename.endswith(".pyc"):
|
|
1191
1152
|
filename = filename[:-1]
|
|
1192
1153
|
|
|
1193
1154
|
if not filename.endswith(PYDEVD_IPYTHON_CONTEXT[0]):
|
|
@@ -1196,7 +1157,7 @@ cdef class PyDBFrame:
|
|
|
1196
1157
|
if f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]:
|
|
1197
1158
|
f2 = f.f_back
|
|
1198
1159
|
if f2 is not None and f2.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]:
|
|
1199
|
-
pydev_log.debug(
|
|
1160
|
+
pydev_log.debug("Stop inside ipython call")
|
|
1200
1161
|
stop = True
|
|
1201
1162
|
break
|
|
1202
1163
|
f = f.f_back
|
|
@@ -1209,11 +1170,13 @@ cdef class PyDBFrame:
|
|
|
1209
1170
|
return None if is_call else NO_FTRACE
|
|
1210
1171
|
|
|
1211
1172
|
elif is_return and frame.f_back is not None and not info.pydev_use_scoped_step_frame:
|
|
1212
|
-
if
|
|
1173
|
+
if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE:
|
|
1213
1174
|
stop = False
|
|
1214
1175
|
else:
|
|
1215
|
-
if force_check_project_scope or
|
|
1216
|
-
stop = not
|
|
1176
|
+
if force_check_project_scope or py_db.is_files_filter_enabled:
|
|
1177
|
+
stop = not py_db.apply_files_filter(
|
|
1178
|
+
frame.f_back, frame.f_back.f_code.co_filename, force_check_project_scope
|
|
1179
|
+
)
|
|
1217
1180
|
if stop:
|
|
1218
1181
|
# Prevent stopping in a return to the same location we were initially
|
|
1219
1182
|
# (i.e.: double-stop at the same place due to some filtering).
|
|
@@ -1236,7 +1199,7 @@ cdef class PyDBFrame:
|
|
|
1236
1199
|
stop = False
|
|
1237
1200
|
|
|
1238
1201
|
if plugin_manager is not None:
|
|
1239
|
-
result = plugin_manager.cmd_step_into(
|
|
1202
|
+
result = plugin_manager.cmd_step_into(py_db, frame, event, self._args[2], self._args[3], stop_info, stop)
|
|
1240
1203
|
if result:
|
|
1241
1204
|
stop, plugin_stop = result
|
|
1242
1205
|
|
|
@@ -1249,7 +1212,7 @@ cdef class PyDBFrame:
|
|
|
1249
1212
|
# i.e.: don't stop in: (stop_frame is frame.f_back and is_return) as we'd stop twice in that line.
|
|
1250
1213
|
|
|
1251
1214
|
if plugin_manager is not None:
|
|
1252
|
-
result = plugin_manager.cmd_step_over(
|
|
1215
|
+
result = plugin_manager.cmd_step_over(py_db, frame, event, self._args[2], self._args[3], stop_info, stop)
|
|
1253
1216
|
if result:
|
|
1254
1217
|
stop, plugin_stop = result
|
|
1255
1218
|
|
|
@@ -1273,16 +1236,19 @@ cdef class PyDBFrame:
|
|
|
1273
1236
|
if pydev_smart_parent_offset >= 0 and pydev_smart_step_into_variants:
|
|
1274
1237
|
# Preferred mode (when the smart step into variants are available
|
|
1275
1238
|
# and the offset is set).
|
|
1276
|
-
stop = get_smart_step_into_variant_from_frame_offset(
|
|
1277
|
-
|
|
1239
|
+
stop = get_smart_step_into_variant_from_frame_offset(
|
|
1240
|
+
back.f_lasti, pydev_smart_step_into_variants
|
|
1241
|
+
) is get_smart_step_into_variant_from_frame_offset(
|
|
1242
|
+
pydev_smart_parent_offset, pydev_smart_step_into_variants
|
|
1243
|
+
)
|
|
1278
1244
|
|
|
1279
1245
|
else:
|
|
1280
1246
|
# Only the name/line is available, so, check that.
|
|
1281
1247
|
curr_func_name = frame.f_code.co_name
|
|
1282
1248
|
|
|
1283
1249
|
# global context is set with an empty name
|
|
1284
|
-
if curr_func_name in (
|
|
1285
|
-
curr_func_name =
|
|
1250
|
+
if curr_func_name in ("?", "<module>") or curr_func_name is None:
|
|
1251
|
+
curr_func_name = ""
|
|
1286
1252
|
if curr_func_name == info.pydev_func_name and stop_frame.f_lineno == info.pydev_next_line:
|
|
1287
1253
|
stop = True
|
|
1288
1254
|
|
|
@@ -1309,13 +1275,15 @@ cdef class PyDBFrame:
|
|
|
1309
1275
|
# the child (because this is a generator, the parent may have moved forward
|
|
1310
1276
|
# already -- and that's ok, so, we just check that the parent frame
|
|
1311
1277
|
# matches in this case).
|
|
1312
|
-
smart_step_into_variant = get_smart_step_into_variant_from_frame_offset(
|
|
1278
|
+
smart_step_into_variant = get_smart_step_into_variant_from_frame_offset(
|
|
1279
|
+
pydev_smart_parent_offset, pydev_smart_step_into_variants
|
|
1280
|
+
)
|
|
1313
1281
|
# print('matched parent offset', pydev_smart_parent_offset)
|
|
1314
1282
|
# Ok, now, check the child variant
|
|
1315
1283
|
children_variants = smart_step_into_variant.children_variants
|
|
1316
1284
|
stop = children_variants and (
|
|
1317
|
-
get_smart_step_into_variant_from_frame_offset(back.f_lasti, children_variants)
|
|
1318
|
-
get_smart_step_into_variant_from_frame_offset(pydev_smart_child_offset, children_variants)
|
|
1285
|
+
get_smart_step_into_variant_from_frame_offset(back.f_lasti, children_variants)
|
|
1286
|
+
is get_smart_step_into_variant_from_frame_offset(pydev_smart_child_offset, children_variants)
|
|
1319
1287
|
)
|
|
1320
1288
|
# print('stop at child', stop)
|
|
1321
1289
|
|
|
@@ -1331,13 +1299,13 @@ cdef class PyDBFrame:
|
|
|
1331
1299
|
stop = False
|
|
1332
1300
|
|
|
1333
1301
|
if stop and step_cmd != -1 and is_return and hasattr(frame, "f_back"):
|
|
1334
|
-
f_code = getattr(frame.f_back,
|
|
1302
|
+
f_code = getattr(frame.f_back, "f_code", None)
|
|
1335
1303
|
if f_code is not None:
|
|
1336
|
-
if
|
|
1304
|
+
if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE:
|
|
1337
1305
|
stop = False
|
|
1338
1306
|
|
|
1339
1307
|
if plugin_stop:
|
|
1340
|
-
|
|
1308
|
+
plugin_manager.stop(py_db, frame, event, self._args[3], stop_info, arg, step_cmd)
|
|
1341
1309
|
elif stop:
|
|
1342
1310
|
if is_line:
|
|
1343
1311
|
self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd)
|
|
@@ -1358,13 +1326,13 @@ cdef class PyDBFrame:
|
|
|
1358
1326
|
return None if is_call else NO_FTRACE
|
|
1359
1327
|
|
|
1360
1328
|
elif pydevd_dont_trace.should_trace_hook is not None:
|
|
1361
|
-
if not pydevd_dont_trace.should_trace_hook(back, back_absolute_filename):
|
|
1329
|
+
if not pydevd_dont_trace.should_trace_hook(back.f_code, back_absolute_filename):
|
|
1362
1330
|
# In this case, we'll have to skip the previous one because it shouldn't be traced.
|
|
1363
1331
|
# Also, we have to reset the tracing, because if the parent's parent (or some
|
|
1364
1332
|
# other parent) has to be traced and it's not currently, we wouldn't stop where
|
|
1365
1333
|
# we should anymore (so, a step in/over/return may not stop anywhere if no parent is traced).
|
|
1366
1334
|
# Related test: _debugger_case17a.py
|
|
1367
|
-
|
|
1335
|
+
py_db.set_trace_for_frame_and_parents(thread.ident, back)
|
|
1368
1336
|
return None if is_call else NO_FTRACE
|
|
1369
1337
|
|
|
1370
1338
|
if back is not None:
|
|
@@ -1377,9 +1345,10 @@ cdef class PyDBFrame:
|
|
|
1377
1345
|
info.pydev_original_step_cmd = -1
|
|
1378
1346
|
info.pydev_step_cmd = -1
|
|
1379
1347
|
info.pydev_state = 1
|
|
1348
|
+
info.update_stepping_info()
|
|
1380
1349
|
|
|
1381
1350
|
# if we are quitting, let's stop the tracing
|
|
1382
|
-
if
|
|
1351
|
+
if py_db.quitting:
|
|
1383
1352
|
return None if is_call else NO_FTRACE
|
|
1384
1353
|
|
|
1385
1354
|
return self.trace_dispatch
|
|
@@ -1387,9 +1356,14 @@ cdef class PyDBFrame:
|
|
|
1387
1356
|
# Unfortunately Python itself stops the tracing when it originates from
|
|
1388
1357
|
# the tracing function, so, we can't do much about it (just let the user know).
|
|
1389
1358
|
exc = sys.exc_info()[0]
|
|
1390
|
-
cmd =
|
|
1391
|
-
|
|
1392
|
-
|
|
1359
|
+
cmd = py_db.cmd_factory.make_console_message(
|
|
1360
|
+
"%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n"
|
|
1361
|
+
% (
|
|
1362
|
+
exc,
|
|
1363
|
+
thread,
|
|
1364
|
+
)
|
|
1365
|
+
)
|
|
1366
|
+
py_db.writer.add_command(cmd)
|
|
1393
1367
|
if not issubclass(exc, (KeyboardInterrupt, SystemExit)):
|
|
1394
1368
|
pydev_log.exception()
|
|
1395
1369
|
raise
|
|
@@ -1398,20 +1372,284 @@ cdef class PyDBFrame:
|
|
|
1398
1372
|
info.is_tracing -= 1
|
|
1399
1373
|
|
|
1400
1374
|
# end trace_dispatch
|
|
1375
|
+
|
|
1376
|
+
|
|
1377
|
+
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
1378
|
+
def should_stop_on_exception(py_db, PyDBAdditionalThreadInfo info, frame, thread, arg, prev_user_uncaught_exc_info):
|
|
1379
|
+
cdef bint should_stop;
|
|
1380
|
+
cdef bint was_just_raised;
|
|
1381
|
+
cdef list check_excs;
|
|
1382
|
+
# ELSE
|
|
1383
|
+
# def should_stop_on_exception(py_db, info, frame, thread, arg, prev_user_uncaught_exc_info):
|
|
1384
|
+
# ENDIF
|
|
1385
|
+
|
|
1386
|
+
should_stop = False
|
|
1387
|
+
maybe_user_uncaught_exc_info = prev_user_uncaught_exc_info
|
|
1388
|
+
|
|
1389
|
+
# 2 = 2
|
|
1390
|
+
if info.pydev_state != 2: # and breakpoint is not None:
|
|
1391
|
+
exception, value, trace = arg
|
|
1392
|
+
|
|
1393
|
+
if trace is not None and hasattr(trace, "tb_next"):
|
|
1394
|
+
# on jython trace is None on the first event and it may not have a tb_next.
|
|
1395
|
+
|
|
1396
|
+
should_stop = False
|
|
1397
|
+
exception_breakpoint = None
|
|
1398
|
+
try:
|
|
1399
|
+
if py_db.plugin is not None:
|
|
1400
|
+
result = py_db.plugin.exception_break(py_db, frame, thread, arg)
|
|
1401
|
+
if result:
|
|
1402
|
+
should_stop, frame = result
|
|
1403
|
+
except:
|
|
1404
|
+
pydev_log.exception()
|
|
1405
|
+
|
|
1406
|
+
if not should_stop:
|
|
1407
|
+
# Apply checks that don't need the exception breakpoint (where we shouldn't ever stop).
|
|
1408
|
+
if exception == SystemExit and py_db.ignore_system_exit_code(value):
|
|
1409
|
+
pass
|
|
1410
|
+
|
|
1411
|
+
elif exception in (GeneratorExit, StopIteration, StopAsyncIteration):
|
|
1412
|
+
# These exceptions are control-flow related (they work as a generator
|
|
1413
|
+
# pause), so, we shouldn't stop on them.
|
|
1414
|
+
pass
|
|
1415
|
+
|
|
1416
|
+
elif ignore_exception_trace(trace):
|
|
1417
|
+
pass
|
|
1418
|
+
|
|
1419
|
+
else:
|
|
1420
|
+
was_just_raised = just_raised(trace)
|
|
1421
|
+
|
|
1422
|
+
# It was not handled by any plugin, lets check exception breakpoints.
|
|
1423
|
+
check_excs = []
|
|
1424
|
+
|
|
1425
|
+
# Note: check user unhandled before regular exceptions.
|
|
1426
|
+
exc_break_user = py_db.get_exception_breakpoint(exception, py_db.break_on_user_uncaught_exceptions)
|
|
1427
|
+
if exc_break_user is not None:
|
|
1428
|
+
check_excs.append((exc_break_user, True))
|
|
1429
|
+
|
|
1430
|
+
exc_break_caught = py_db.get_exception_breakpoint(exception, py_db.break_on_caught_exceptions)
|
|
1431
|
+
if exc_break_caught is not None:
|
|
1432
|
+
check_excs.append((exc_break_caught, False))
|
|
1433
|
+
|
|
1434
|
+
for exc_break, is_user_uncaught in check_excs:
|
|
1435
|
+
# Initially mark that it should stop and then go into exclusions.
|
|
1436
|
+
should_stop = True
|
|
1437
|
+
|
|
1438
|
+
if py_db.exclude_exception_by_filter(exc_break, trace):
|
|
1439
|
+
pydev_log.debug(
|
|
1440
|
+
"Ignore exception %s in library %s -- (%s)" % (exception, frame.f_code.co_filename, frame.f_code.co_name)
|
|
1441
|
+
)
|
|
1442
|
+
should_stop = False
|
|
1443
|
+
|
|
1444
|
+
elif exc_break.condition is not None and not py_db.handle_breakpoint_condition(info, exc_break, frame):
|
|
1445
|
+
should_stop = False
|
|
1446
|
+
|
|
1447
|
+
elif is_user_uncaught:
|
|
1448
|
+
# Note: we don't stop here, we just collect the exc_info to use later on...
|
|
1449
|
+
should_stop = False
|
|
1450
|
+
if not py_db.apply_files_filter(frame, frame.f_code.co_filename, True) and (
|
|
1451
|
+
frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)
|
|
1452
|
+
):
|
|
1453
|
+
# User uncaught means that we're currently in user code but the code
|
|
1454
|
+
# up the stack is library code.
|
|
1455
|
+
exc_info = prev_user_uncaught_exc_info
|
|
1456
|
+
if not exc_info:
|
|
1457
|
+
exc_info = (arg, frame.f_lineno, set([frame.f_lineno]))
|
|
1458
|
+
else:
|
|
1459
|
+
lines = exc_info[2]
|
|
1460
|
+
lines.add(frame.f_lineno)
|
|
1461
|
+
exc_info = (arg, frame.f_lineno, lines)
|
|
1462
|
+
maybe_user_uncaught_exc_info = exc_info
|
|
1463
|
+
else:
|
|
1464
|
+
# I.e.: these are only checked if we're not dealing with user uncaught exceptions.
|
|
1465
|
+
if (
|
|
1466
|
+
exc_break.notify_on_first_raise_only
|
|
1467
|
+
and py_db.skip_on_exceptions_thrown_in_same_context
|
|
1468
|
+
and not was_just_raised
|
|
1469
|
+
and not just_raised(trace.tb_next)
|
|
1470
|
+
):
|
|
1471
|
+
# In this case we never stop if it was just raised, so, to know if it was the first we
|
|
1472
|
+
# need to check if we're in the 2nd method.
|
|
1473
|
+
should_stop = False # I.e.: we stop only when we're at the caller of a method that throws an exception
|
|
1474
|
+
|
|
1475
|
+
elif (
|
|
1476
|
+
exc_break.notify_on_first_raise_only
|
|
1477
|
+
and not py_db.skip_on_exceptions_thrown_in_same_context
|
|
1478
|
+
and not was_just_raised
|
|
1479
|
+
):
|
|
1480
|
+
should_stop = False # I.e.: we stop only when it was just raised
|
|
1481
|
+
|
|
1482
|
+
elif was_just_raised and py_db.skip_on_exceptions_thrown_in_same_context:
|
|
1483
|
+
# Option: Don't break if an exception is caught in the same function from which it is thrown
|
|
1484
|
+
should_stop = False
|
|
1485
|
+
|
|
1486
|
+
if should_stop:
|
|
1487
|
+
exception_breakpoint = exc_break
|
|
1488
|
+
try:
|
|
1489
|
+
info.pydev_message = exc_break.qname
|
|
1490
|
+
except:
|
|
1491
|
+
info.pydev_message = exc_break.qname.encode("utf-8")
|
|
1492
|
+
break
|
|
1493
|
+
|
|
1494
|
+
if should_stop:
|
|
1495
|
+
# Always add exception to frame (must remove later after we proceed).
|
|
1496
|
+
add_exception_to_frame(frame, (exception, value, trace))
|
|
1497
|
+
|
|
1498
|
+
if exception_breakpoint is not None and exception_breakpoint.expression is not None:
|
|
1499
|
+
py_db.handle_breakpoint_expression(exception_breakpoint, info, frame)
|
|
1500
|
+
|
|
1501
|
+
return should_stop, frame, maybe_user_uncaught_exc_info
|
|
1502
|
+
|
|
1503
|
+
|
|
1504
|
+
# Same thing in the main debugger but only considering the file contents, while the one in the main debugger
|
|
1505
|
+
# considers the user input (so, the actual result must be a join of both).
|
|
1506
|
+
filename_to_lines_where_exceptions_are_ignored: dict = {}
|
|
1507
|
+
filename_to_stat_info: dict = {}
|
|
1508
|
+
|
|
1509
|
+
|
|
1510
|
+
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
1511
|
+
def handle_exception(py_db, thread, frame, arg, str exception_type):
|
|
1512
|
+
cdef bint stopped;
|
|
1513
|
+
cdef tuple abs_real_path_and_base;
|
|
1514
|
+
cdef str absolute_filename;
|
|
1515
|
+
cdef str canonical_normalized_filename;
|
|
1516
|
+
cdef dict lines_ignored;
|
|
1517
|
+
cdef dict frame_id_to_frame;
|
|
1518
|
+
cdef dict merged;
|
|
1519
|
+
cdef object trace_obj;
|
|
1520
|
+
# ELSE
|
|
1521
|
+
# def handle_exception(py_db, thread, frame, arg, exception_type):
|
|
1522
|
+
# ENDIF
|
|
1523
|
+
stopped = False
|
|
1524
|
+
try:
|
|
1525
|
+
# print('handle_exception', frame.f_lineno, frame.f_code.co_name)
|
|
1526
|
+
|
|
1527
|
+
# We have 3 things in arg: exception type, description, traceback object
|
|
1528
|
+
trace_obj = arg[2]
|
|
1529
|
+
|
|
1530
|
+
initial_trace_obj = trace_obj
|
|
1531
|
+
if trace_obj.tb_next is None and trace_obj.tb_frame is frame:
|
|
1532
|
+
# I.e.: tb_next should be only None in the context it was thrown (trace_obj.tb_frame is frame is just a double check).
|
|
1533
|
+
pass
|
|
1534
|
+
else:
|
|
1535
|
+
# Get the trace_obj from where the exception was raised...
|
|
1536
|
+
while trace_obj.tb_next is not None:
|
|
1537
|
+
trace_obj = trace_obj.tb_next
|
|
1538
|
+
|
|
1539
|
+
if py_db.ignore_exceptions_thrown_in_lines_with_ignore_exception:
|
|
1540
|
+
for check_trace_obj in (initial_trace_obj, trace_obj):
|
|
1541
|
+
abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame)
|
|
1542
|
+
absolute_filename = abs_real_path_and_base[0]
|
|
1543
|
+
canonical_normalized_filename = abs_real_path_and_base[1]
|
|
1544
|
+
|
|
1545
|
+
lines_ignored = filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename)
|
|
1546
|
+
if lines_ignored is None:
|
|
1547
|
+
lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {}
|
|
1548
|
+
|
|
1549
|
+
try:
|
|
1550
|
+
curr_stat = os.stat(absolute_filename)
|
|
1551
|
+
curr_stat = (curr_stat.st_size, curr_stat.st_mtime)
|
|
1552
|
+
except:
|
|
1553
|
+
curr_stat = None
|
|
1554
|
+
|
|
1555
|
+
last_stat = filename_to_stat_info.get(absolute_filename)
|
|
1556
|
+
if last_stat != curr_stat:
|
|
1557
|
+
filename_to_stat_info[absolute_filename] = curr_stat
|
|
1558
|
+
lines_ignored.clear()
|
|
1559
|
+
try:
|
|
1560
|
+
linecache.checkcache(absolute_filename)
|
|
1561
|
+
except:
|
|
1562
|
+
pydev_log.exception("Error in linecache.checkcache(%r)", absolute_filename)
|
|
1563
|
+
|
|
1564
|
+
from_user_input = py_db.filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename)
|
|
1565
|
+
if from_user_input:
|
|
1566
|
+
merged = {}
|
|
1567
|
+
merged.update(lines_ignored)
|
|
1568
|
+
# Override what we have with the related entries that the user entered
|
|
1569
|
+
merged.update(from_user_input)
|
|
1570
|
+
else:
|
|
1571
|
+
merged = lines_ignored
|
|
1572
|
+
|
|
1573
|
+
exc_lineno = check_trace_obj.tb_lineno
|
|
1574
|
+
|
|
1575
|
+
# print ('lines ignored', lines_ignored)
|
|
1576
|
+
# print ('user input', from_user_input)
|
|
1577
|
+
# print ('merged', merged, 'curr', exc_lineno)
|
|
1578
|
+
|
|
1579
|
+
if exc_lineno not in merged: # Note: check on merged but update lines_ignored.
|
|
1580
|
+
try:
|
|
1581
|
+
line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals)
|
|
1582
|
+
except:
|
|
1583
|
+
pydev_log.exception("Error in linecache.getline(%r, %s, f_globals)", absolute_filename, exc_lineno)
|
|
1584
|
+
line = ""
|
|
1585
|
+
|
|
1586
|
+
if IGNORE_EXCEPTION_TAG.match(line) is not None:
|
|
1587
|
+
lines_ignored[exc_lineno] = 1
|
|
1588
|
+
return False
|
|
1589
|
+
else:
|
|
1590
|
+
# Put in the cache saying not to ignore
|
|
1591
|
+
lines_ignored[exc_lineno] = 0
|
|
1592
|
+
else:
|
|
1593
|
+
# Ok, dict has it already cached, so, let's check it...
|
|
1594
|
+
if merged.get(exc_lineno, 0):
|
|
1595
|
+
return False
|
|
1596
|
+
|
|
1597
|
+
try:
|
|
1598
|
+
frame_id_to_frame = {}
|
|
1599
|
+
frame_id_to_frame[id(frame)] = frame
|
|
1600
|
+
f = trace_obj.tb_frame
|
|
1601
|
+
while f is not None:
|
|
1602
|
+
frame_id_to_frame[id(f)] = f
|
|
1603
|
+
f = f.f_back
|
|
1604
|
+
f = None
|
|
1605
|
+
|
|
1606
|
+
stopped = True
|
|
1607
|
+
py_db.send_caught_exception_stack(thread, arg, id(frame))
|
|
1608
|
+
try:
|
|
1609
|
+
py_db.set_suspend(thread, 137)
|
|
1610
|
+
py_db.do_wait_suspend(thread, frame, "exception", arg, exception_type=exception_type)
|
|
1611
|
+
finally:
|
|
1612
|
+
py_db.send_caught_exception_stack_proceeded(thread)
|
|
1613
|
+
except:
|
|
1614
|
+
pydev_log.exception()
|
|
1615
|
+
|
|
1616
|
+
py_db.set_trace_for_frame_and_parents(thread.ident, frame)
|
|
1617
|
+
finally:
|
|
1618
|
+
# Make sure the user cannot see the '__exception__' we added after we leave the suspend state.
|
|
1619
|
+
remove_exception_from_frame(frame)
|
|
1620
|
+
# Clear some local variables...
|
|
1621
|
+
frame = None
|
|
1622
|
+
trace_obj = None
|
|
1623
|
+
initial_trace_obj = None
|
|
1624
|
+
check_trace_obj = None
|
|
1625
|
+
f = None
|
|
1626
|
+
frame_id_to_frame = None
|
|
1627
|
+
py_db = None
|
|
1628
|
+
thread = None
|
|
1629
|
+
|
|
1630
|
+
return stopped
|
|
1401
1631
|
from _pydev_bundle.pydev_is_thread_alive import is_thread_alive
|
|
1402
1632
|
from _pydev_bundle.pydev_log import exception as pydev_log_exception
|
|
1403
1633
|
from _pydev_bundle._pydev_saved_modules import threading
|
|
1404
|
-
from _pydevd_bundle.pydevd_constants import (
|
|
1405
|
-
|
|
1634
|
+
from _pydevd_bundle.pydevd_constants import (
|
|
1635
|
+
get_current_thread_id,
|
|
1636
|
+
NO_FTRACE,
|
|
1637
|
+
USE_CUSTOM_SYS_CURRENT_FRAMES_MAP,
|
|
1638
|
+
ForkSafeLock,
|
|
1639
|
+
PYDEVD_USE_SYS_MONITORING,
|
|
1640
|
+
)
|
|
1406
1641
|
from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame, NORM_PATHS_AND_BASE_CONTAINER
|
|
1407
1642
|
|
|
1643
|
+
# fmt: off
|
|
1408
1644
|
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
1409
1645
|
from cpython.object cimport PyObject
|
|
1410
1646
|
from cpython.ref cimport Py_INCREF, Py_XDECREF
|
|
1411
1647
|
# ELSE
|
|
1412
1648
|
# from _pydevd_bundle.pydevd_frame import PyDBFrame, is_unhandled_exception
|
|
1413
1649
|
# ENDIF
|
|
1650
|
+
# fmt: on
|
|
1414
1651
|
|
|
1652
|
+
# fmt: off
|
|
1415
1653
|
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
1416
1654
|
cdef dict _global_notify_skipped_step_in
|
|
1417
1655
|
# ELSE
|
|
@@ -1421,6 +1659,7 @@ cdef dict _global_notify_skipped_step_in
|
|
|
1421
1659
|
# 109 = 109
|
|
1422
1660
|
# 160 = 160
|
|
1423
1661
|
# ENDIF
|
|
1662
|
+
# fmt: on
|
|
1424
1663
|
|
|
1425
1664
|
# Cache where we should keep that we completely skipped entering some context.
|
|
1426
1665
|
# It needs to be invalidated when:
|
|
@@ -1444,6 +1683,8 @@ def notify_skipped_step_in_because_of_filters(py_db, frame):
|
|
|
1444
1683
|
_global_notify_skipped_step_in = True
|
|
1445
1684
|
py_db.notify_skipped_step_in_because_of_filters(frame)
|
|
1446
1685
|
|
|
1686
|
+
|
|
1687
|
+
# fmt: off
|
|
1447
1688
|
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
1448
1689
|
cdef class SafeCallWrapper:
|
|
1449
1690
|
cdef method_object
|
|
@@ -1461,14 +1702,17 @@ cdef class SafeCallWrapper:
|
|
|
1461
1702
|
return self.method_object
|
|
1462
1703
|
# ELSE
|
|
1463
1704
|
# ENDIF
|
|
1705
|
+
# fmt: on
|
|
1464
1706
|
|
|
1465
1707
|
|
|
1466
1708
|
def fix_top_level_trace_and_get_trace_func(py_db, frame):
|
|
1709
|
+
# fmt: off
|
|
1467
1710
|
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
1468
1711
|
cdef str filename;
|
|
1469
1712
|
cdef str name;
|
|
1470
1713
|
cdef tuple args;
|
|
1471
1714
|
# ENDIF
|
|
1715
|
+
# fmt: on
|
|
1472
1716
|
|
|
1473
1717
|
# Note: this is always the first entry-point in the tracing for any thread.
|
|
1474
1718
|
# After entering here we'll set a new tracing function for this thread
|
|
@@ -1486,45 +1730,45 @@ def fix_top_level_trace_and_get_trace_func(py_db, frame):
|
|
|
1486
1730
|
|
|
1487
1731
|
name = f_unhandled.f_code.co_filename
|
|
1488
1732
|
# basename
|
|
1489
|
-
i = name.rfind(
|
|
1490
|
-
j = name.rfind(
|
|
1733
|
+
i = name.rfind("/")
|
|
1734
|
+
j = name.rfind("\\")
|
|
1491
1735
|
if j > i:
|
|
1492
1736
|
i = j
|
|
1493
1737
|
if i >= 0:
|
|
1494
|
-
name = name[i + 1:]
|
|
1738
|
+
name = name[i + 1 :]
|
|
1495
1739
|
# remove ext
|
|
1496
|
-
i = name.rfind(
|
|
1740
|
+
i = name.rfind(".")
|
|
1497
1741
|
if i >= 0:
|
|
1498
1742
|
name = name[:i]
|
|
1499
1743
|
|
|
1500
|
-
if name ==
|
|
1501
|
-
if f_unhandled.f_code.co_name in (
|
|
1744
|
+
if name == "threading":
|
|
1745
|
+
if f_unhandled.f_code.co_name in ("__bootstrap", "_bootstrap"):
|
|
1502
1746
|
# We need __bootstrap_inner, not __bootstrap.
|
|
1503
1747
|
return None, False
|
|
1504
1748
|
|
|
1505
|
-
elif f_unhandled.f_code.co_name in (
|
|
1749
|
+
elif f_unhandled.f_code.co_name in ("__bootstrap_inner", "_bootstrap_inner"):
|
|
1506
1750
|
# Note: be careful not to use threading.currentThread to avoid creating a dummy thread.
|
|
1507
|
-
t = f_unhandled.f_locals.get(
|
|
1751
|
+
t = f_unhandled.f_locals.get("self")
|
|
1508
1752
|
force_only_unhandled_tracer = True
|
|
1509
1753
|
if t is not None and isinstance(t, threading.Thread):
|
|
1510
1754
|
thread = t
|
|
1511
1755
|
break
|
|
1512
1756
|
|
|
1513
|
-
elif name ==
|
|
1514
|
-
if f_unhandled.f_code.co_name ==
|
|
1757
|
+
elif name == "pydev_monkey":
|
|
1758
|
+
if f_unhandled.f_code.co_name == "__call__":
|
|
1515
1759
|
force_only_unhandled_tracer = True
|
|
1516
1760
|
break
|
|
1517
1761
|
|
|
1518
|
-
elif name ==
|
|
1519
|
-
if f_unhandled.f_code.co_name in (
|
|
1762
|
+
elif name == "pydevd":
|
|
1763
|
+
if f_unhandled.f_code.co_name in ("run", "main"):
|
|
1520
1764
|
# We need to get to _exec
|
|
1521
1765
|
return None, False
|
|
1522
1766
|
|
|
1523
|
-
if f_unhandled.f_code.co_name ==
|
|
1767
|
+
if f_unhandled.f_code.co_name == "_exec":
|
|
1524
1768
|
force_only_unhandled_tracer = True
|
|
1525
1769
|
break
|
|
1526
1770
|
|
|
1527
|
-
elif name ==
|
|
1771
|
+
elif name == "pydevd_tracing":
|
|
1528
1772
|
return None, False
|
|
1529
1773
|
|
|
1530
1774
|
elif f_unhandled.f_back is None:
|
|
@@ -1543,7 +1787,7 @@ def fix_top_level_trace_and_get_trace_func(py_db, frame):
|
|
|
1543
1787
|
# Jython does not have threading.get_ident().
|
|
1544
1788
|
thread = py_db.threading_current_thread()
|
|
1545
1789
|
|
|
1546
|
-
if getattr(thread,
|
|
1790
|
+
if getattr(thread, "pydev_do_not_trace", None):
|
|
1547
1791
|
py_db.disable_tracing()
|
|
1548
1792
|
return None, False
|
|
1549
1793
|
|
|
@@ -1561,19 +1805,25 @@ def fix_top_level_trace_and_get_trace_func(py_db, frame):
|
|
|
1561
1805
|
if f_unhandled.f_back is None and not force_only_unhandled_tracer:
|
|
1562
1806
|
# Happens when we attach to a running program (cannot reuse instance because it's mutable).
|
|
1563
1807
|
top_level_thread_tracer = TopLevelThreadTracerNoBackFrame(ThreadTracer(args), args)
|
|
1564
|
-
additional_info.top_level_thread_tracer_no_back_frames.append(
|
|
1808
|
+
additional_info.top_level_thread_tracer_no_back_frames.append(
|
|
1809
|
+
top_level_thread_tracer
|
|
1810
|
+
) # Hack for cython to keep it alive while the thread is alive (just the method in the SetTrace is not enough).
|
|
1565
1811
|
else:
|
|
1566
1812
|
top_level_thread_tracer = additional_info.top_level_thread_tracer_unhandled
|
|
1567
1813
|
if top_level_thread_tracer is None:
|
|
1568
1814
|
# Stop in some internal place to report about unhandled exceptions
|
|
1569
1815
|
top_level_thread_tracer = TopLevelThreadTracerOnlyUnhandledExceptions(args)
|
|
1570
|
-
additional_info.top_level_thread_tracer_unhandled =
|
|
1816
|
+
additional_info.top_level_thread_tracer_unhandled = (
|
|
1817
|
+
top_level_thread_tracer
|
|
1818
|
+
) # Hack for cython to keep it alive while the thread is alive (just the method in the SetTrace is not enough).
|
|
1571
1819
|
|
|
1572
1820
|
# print(' --> found to trace unhandled', f_unhandled.f_code.co_name, f_unhandled.f_code.co_filename, f_unhandled.f_code.co_firstlineno)
|
|
1573
1821
|
f_trace = top_level_thread_tracer.get_trace_dispatch_func()
|
|
1822
|
+
# fmt: off
|
|
1574
1823
|
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
1575
1824
|
f_trace = SafeCallWrapper(f_trace)
|
|
1576
1825
|
# ENDIF
|
|
1826
|
+
# fmt: on
|
|
1577
1827
|
f_unhandled.f_trace = f_trace
|
|
1578
1828
|
|
|
1579
1829
|
if frame is f_unhandled:
|
|
@@ -1584,22 +1834,25 @@ def fix_top_level_trace_and_get_trace_func(py_db, frame):
|
|
|
1584
1834
|
thread_tracer = ThreadTracer(args)
|
|
1585
1835
|
additional_info.thread_tracer = thread_tracer
|
|
1586
1836
|
|
|
1587
|
-
#
|
|
1837
|
+
# fmt: off
|
|
1838
|
+
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
1588
1839
|
return SafeCallWrapper(thread_tracer), True
|
|
1589
|
-
# ELSE
|
|
1840
|
+
# ELSE
|
|
1590
1841
|
# return thread_tracer, True
|
|
1591
|
-
# ENDIF
|
|
1842
|
+
# ENDIF
|
|
1843
|
+
# fmt: on
|
|
1592
1844
|
|
|
1593
1845
|
|
|
1594
1846
|
def trace_dispatch(py_db, frame, event, arg):
|
|
1595
1847
|
thread_trace_func, apply_to_settrace = py_db.fix_top_level_trace_and_get_trace_func(py_db, frame)
|
|
1596
1848
|
if thread_trace_func is None:
|
|
1597
|
-
return None if event ==
|
|
1849
|
+
return None if event == "call" else NO_FTRACE
|
|
1598
1850
|
if apply_to_settrace:
|
|
1599
1851
|
py_db.enable_tracing(thread_trace_func)
|
|
1600
1852
|
return thread_trace_func(frame, event, arg)
|
|
1601
1853
|
|
|
1602
1854
|
|
|
1855
|
+
# fmt: off
|
|
1603
1856
|
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
1604
1857
|
cdef class TopLevelThreadTracerOnlyUnhandledExceptions:
|
|
1605
1858
|
cdef public tuple _args;
|
|
@@ -1607,15 +1860,16 @@ cdef class TopLevelThreadTracerOnlyUnhandledExceptions:
|
|
|
1607
1860
|
self._args = args
|
|
1608
1861
|
# ELSE
|
|
1609
1862
|
# class TopLevelThreadTracerOnlyUnhandledExceptions(object):
|
|
1610
|
-
#
|
|
1611
1863
|
# def __init__(self, args):
|
|
1612
1864
|
# self._args = args
|
|
1865
|
+
#
|
|
1613
1866
|
# ENDIF
|
|
1867
|
+
# fmt: on
|
|
1614
1868
|
|
|
1615
1869
|
def trace_unhandled_exceptions(self, frame, event, arg):
|
|
1616
1870
|
# Note that we ignore the frame as this tracing method should only be put in topmost frames already.
|
|
1617
1871
|
# print('trace_unhandled_exceptions', event, frame.f_code.co_name, frame.f_code.co_filename, frame.f_code.co_firstlineno)
|
|
1618
|
-
if event ==
|
|
1872
|
+
if event == "exception" and arg is not None:
|
|
1619
1873
|
py_db, t, additional_info = self._args[0:3]
|
|
1620
1874
|
if arg is not None:
|
|
1621
1875
|
if not additional_info.suspended_at_unhandled:
|
|
@@ -1629,7 +1883,7 @@ cdef class TopLevelThreadTracerOnlyUnhandledExceptions:
|
|
|
1629
1883
|
def get_trace_dispatch_func(self):
|
|
1630
1884
|
return self.trace_unhandled_exceptions
|
|
1631
1885
|
|
|
1632
|
-
|
|
1886
|
+
# fmt: off
|
|
1633
1887
|
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
1634
1888
|
cdef class TopLevelThreadTracerNoBackFrame:
|
|
1635
1889
|
cdef public object _frame_trace_dispatch;
|
|
@@ -1647,7 +1901,7 @@ cdef class TopLevelThreadTracerNoBackFrame:
|
|
|
1647
1901
|
self._last_raise_line = -1
|
|
1648
1902
|
# ELSE
|
|
1649
1903
|
# class TopLevelThreadTracerNoBackFrame(object):
|
|
1650
|
-
#
|
|
1904
|
+
# """
|
|
1651
1905
|
# This tracer is pretty special in that it's dealing with a frame without f_back (i.e.: top frame
|
|
1652
1906
|
# on remote attach or QThread).
|
|
1653
1907
|
#
|
|
@@ -1657,7 +1911,7 @@ cdef class TopLevelThreadTracerNoBackFrame:
|
|
|
1657
1911
|
# work with in the tracing -- see: https://bugs.python.org/issue34099, so, we inspect bytecode to
|
|
1658
1912
|
# determine if some exception will be traced or not... note that if this is not available -- such
|
|
1659
1913
|
# as on Jython -- we consider any top-level exception to be unnhandled).
|
|
1660
|
-
#
|
|
1914
|
+
# """
|
|
1661
1915
|
#
|
|
1662
1916
|
# def __init__(self, frame_trace_dispatch, args):
|
|
1663
1917
|
# self._frame_trace_dispatch = frame_trace_dispatch
|
|
@@ -1666,7 +1920,9 @@ cdef class TopLevelThreadTracerNoBackFrame:
|
|
|
1666
1920
|
# self._last_exc_arg = None
|
|
1667
1921
|
# self._raise_lines = set()
|
|
1668
1922
|
# self._last_raise_line = -1
|
|
1923
|
+
#
|
|
1669
1924
|
# ENDIF
|
|
1925
|
+
# fmt: on
|
|
1670
1926
|
|
|
1671
1927
|
def trace_dispatch_and_unhandled_exceptions(self, frame, event, arg):
|
|
1672
1928
|
# DEBUG = 'code_to_debug' in frame.f_code.co_filename
|
|
@@ -1675,12 +1931,12 @@ cdef class TopLevelThreadTracerNoBackFrame:
|
|
|
1675
1931
|
if frame_trace_dispatch is not None:
|
|
1676
1932
|
self._frame_trace_dispatch = frame_trace_dispatch(frame, event, arg)
|
|
1677
1933
|
|
|
1678
|
-
if event ==
|
|
1934
|
+
if event == "exception":
|
|
1679
1935
|
self._last_exc_arg = arg
|
|
1680
1936
|
self._raise_lines.add(frame.f_lineno)
|
|
1681
1937
|
self._last_raise_line = frame.f_lineno
|
|
1682
1938
|
|
|
1683
|
-
elif event ==
|
|
1939
|
+
elif event == "return" and self._last_exc_arg is not None:
|
|
1684
1940
|
# For unhandled exceptions we actually track the return when at the topmost level.
|
|
1685
1941
|
try:
|
|
1686
1942
|
py_db, t, additional_info = self._args[0:3]
|
|
@@ -1694,17 +1950,20 @@ cdef class TopLevelThreadTracerNoBackFrame:
|
|
|
1694
1950
|
ret = self.trace_dispatch_and_unhandled_exceptions
|
|
1695
1951
|
|
|
1696
1952
|
# Need to reset (the call to _frame_trace_dispatch may have changed it).
|
|
1953
|
+
# fmt: off
|
|
1697
1954
|
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
1698
1955
|
frame.f_trace = SafeCallWrapper(ret)
|
|
1699
1956
|
# ELSE
|
|
1700
1957
|
# frame.f_trace = ret
|
|
1701
1958
|
# ENDIF
|
|
1959
|
+
# fmt: on
|
|
1702
1960
|
return ret
|
|
1703
1961
|
|
|
1704
1962
|
def get_trace_dispatch_func(self):
|
|
1705
1963
|
return self.trace_dispatch_and_unhandled_exceptions
|
|
1706
1964
|
|
|
1707
1965
|
|
|
1966
|
+
# fmt: off
|
|
1708
1967
|
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
1709
1968
|
cdef class ThreadTracer:
|
|
1710
1969
|
cdef public tuple _args;
|
|
@@ -1712,13 +1971,14 @@ cdef class ThreadTracer:
|
|
|
1712
1971
|
self._args = args
|
|
1713
1972
|
# ELSE
|
|
1714
1973
|
# class ThreadTracer(object):
|
|
1715
|
-
#
|
|
1716
1974
|
# def __init__(self, args):
|
|
1717
1975
|
# self._args = args
|
|
1976
|
+
#
|
|
1718
1977
|
# ENDIF
|
|
1978
|
+
# fmt: on
|
|
1719
1979
|
|
|
1720
1980
|
def __call__(self, frame, event, arg):
|
|
1721
|
-
|
|
1981
|
+
"""This is the callback used when we enter some context in the debugger.
|
|
1722
1982
|
|
|
1723
1983
|
We also decorate the thread we are in with info about the debugging.
|
|
1724
1984
|
The attributes added are:
|
|
@@ -1729,7 +1989,8 @@ cdef class ThreadTracer:
|
|
|
1729
1989
|
|
|
1730
1990
|
:param PyDB py_db:
|
|
1731
1991
|
This is the global debugger (this method should actually be added as a method to it).
|
|
1732
|
-
|
|
1992
|
+
"""
|
|
1993
|
+
# fmt: off
|
|
1733
1994
|
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
1734
1995
|
cdef str filename;
|
|
1735
1996
|
cdef str base;
|
|
@@ -1740,24 +2001,25 @@ cdef class ThreadTracer:
|
|
|
1740
2001
|
cdef tuple abs_path_canonical_path_and_base;
|
|
1741
2002
|
cdef PyDBAdditionalThreadInfo additional_info;
|
|
1742
2003
|
# ENDIF
|
|
2004
|
+
# fmt: on
|
|
1743
2005
|
|
|
1744
2006
|
# DEBUG = 'code_to_debug' in frame.f_code.co_filename
|
|
1745
2007
|
# if DEBUG: print('ENTER: trace_dispatch: %s %s %s %s' % (frame.f_code.co_filename, frame.f_lineno, event, frame.f_code.co_name))
|
|
1746
2008
|
py_db, t, additional_info, cache_skips, frame_skips_cache = self._args
|
|
1747
2009
|
if additional_info.is_tracing:
|
|
1748
|
-
return None if event ==
|
|
2010
|
+
return None if event == "call" else NO_FTRACE # we don't wan't to trace code invoked from pydevd_frame.trace_dispatch
|
|
1749
2011
|
|
|
1750
2012
|
additional_info.is_tracing += 1
|
|
1751
2013
|
try:
|
|
1752
2014
|
pydev_step_cmd = additional_info.pydev_step_cmd
|
|
1753
2015
|
is_stepping = pydev_step_cmd != -1
|
|
1754
2016
|
if py_db.pydb_disposed:
|
|
1755
|
-
return None if event ==
|
|
2017
|
+
return None if event == "call" else NO_FTRACE
|
|
1756
2018
|
|
|
1757
2019
|
# if thread is not alive, cancel trace_dispatch processing
|
|
1758
2020
|
if not is_thread_alive(t):
|
|
1759
2021
|
py_db.notify_thread_not_alive(get_current_thread_id(t))
|
|
1760
|
-
return None if event ==
|
|
2022
|
+
return None if event == "call" else NO_FTRACE
|
|
1761
2023
|
|
|
1762
2024
|
# Note: it's important that the context name is also given because we may hit something once
|
|
1763
2025
|
# in the global context and another in the local context.
|
|
@@ -1765,23 +2027,30 @@ cdef class ThreadTracer:
|
|
|
1765
2027
|
if frame_cache_key in cache_skips:
|
|
1766
2028
|
if not is_stepping:
|
|
1767
2029
|
# if DEBUG: print('skipped: trace_dispatch (cache hit)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name)
|
|
1768
|
-
return None if event ==
|
|
2030
|
+
return None if event == "call" else NO_FTRACE
|
|
1769
2031
|
else:
|
|
1770
2032
|
# When stepping we can't take into account caching based on the breakpoints (only global filtering).
|
|
1771
2033
|
if cache_skips.get(frame_cache_key) == 1:
|
|
1772
|
-
|
|
1773
|
-
|
|
2034
|
+
if (
|
|
2035
|
+
additional_info.pydev_original_step_cmd in (107, 144)
|
|
2036
|
+
and not _global_notify_skipped_step_in
|
|
2037
|
+
):
|
|
1774
2038
|
notify_skipped_step_in_because_of_filters(py_db, frame)
|
|
1775
2039
|
|
|
1776
2040
|
back_frame = frame.f_back
|
|
1777
|
-
if back_frame is not None and pydev_step_cmd in (
|
|
2041
|
+
if back_frame is not None and pydev_step_cmd in (
|
|
2042
|
+
107,
|
|
2043
|
+
144,
|
|
2044
|
+
109,
|
|
2045
|
+
160,
|
|
2046
|
+
):
|
|
1778
2047
|
back_frame_cache_key = back_frame.f_code
|
|
1779
2048
|
if cache_skips.get(back_frame_cache_key) == 1:
|
|
1780
2049
|
# if DEBUG: print('skipped: trace_dispatch (cache hit: 1)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name)
|
|
1781
|
-
return None if event ==
|
|
2050
|
+
return None if event == "call" else NO_FTRACE
|
|
1782
2051
|
else:
|
|
1783
2052
|
# if DEBUG: print('skipped: trace_dispatch (cache hit: 2)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name)
|
|
1784
|
-
return None if event ==
|
|
2053
|
+
return None if event == "call" else NO_FTRACE
|
|
1785
2054
|
|
|
1786
2055
|
try:
|
|
1787
2056
|
# Make fast path faster!
|
|
@@ -1789,39 +2058,50 @@ cdef class ThreadTracer:
|
|
|
1789
2058
|
except:
|
|
1790
2059
|
abs_path_canonical_path_and_base = get_abs_path_real_path_and_base_from_frame(frame)
|
|
1791
2060
|
|
|
1792
|
-
file_type = py_db.get_file_type(
|
|
2061
|
+
file_type = py_db.get_file_type(
|
|
2062
|
+
frame, abs_path_canonical_path_and_base
|
|
2063
|
+
) # we don't want to debug threading or anything related to pydevd
|
|
1793
2064
|
|
|
1794
2065
|
if file_type is not None:
|
|
1795
2066
|
if file_type == 1: # inlining LIB_FILE = 1
|
|
1796
2067
|
if not py_db.in_project_scope(frame, abs_path_canonical_path_and_base[0]):
|
|
1797
2068
|
# if DEBUG: print('skipped: trace_dispatch (not in scope)', abs_path_canonical_path_and_base[2], frame.f_lineno, event, frame.f_code.co_name, file_type)
|
|
1798
2069
|
cache_skips[frame_cache_key] = 1
|
|
1799
|
-
return None if event ==
|
|
2070
|
+
return None if event == "call" else NO_FTRACE
|
|
1800
2071
|
else:
|
|
1801
2072
|
# if DEBUG: print('skipped: trace_dispatch', abs_path_canonical_path_and_base[2], frame.f_lineno, event, frame.f_code.co_name, file_type)
|
|
1802
2073
|
cache_skips[frame_cache_key] = 1
|
|
1803
|
-
return None if event ==
|
|
2074
|
+
return None if event == "call" else NO_FTRACE
|
|
1804
2075
|
|
|
1805
2076
|
if py_db.is_files_filter_enabled:
|
|
1806
2077
|
if py_db.apply_files_filter(frame, abs_path_canonical_path_and_base[0], False):
|
|
1807
2078
|
cache_skips[frame_cache_key] = 1
|
|
1808
2079
|
|
|
1809
|
-
if
|
|
2080
|
+
if (
|
|
2081
|
+
is_stepping
|
|
2082
|
+
and additional_info.pydev_original_step_cmd in (107, 144)
|
|
2083
|
+
and not _global_notify_skipped_step_in
|
|
2084
|
+
):
|
|
1810
2085
|
notify_skipped_step_in_because_of_filters(py_db, frame)
|
|
1811
2086
|
|
|
1812
2087
|
# A little gotcha, sometimes when we're stepping in we have to stop in a
|
|
1813
2088
|
# return event showing the back frame as the current frame, so, we need
|
|
1814
2089
|
# to check not only the current frame but the back frame too.
|
|
1815
2090
|
back_frame = frame.f_back
|
|
1816
|
-
if back_frame is not None and pydev_step_cmd in (
|
|
2091
|
+
if back_frame is not None and pydev_step_cmd in (
|
|
2092
|
+
107,
|
|
2093
|
+
144,
|
|
2094
|
+
109,
|
|
2095
|
+
160,
|
|
2096
|
+
):
|
|
1817
2097
|
if py_db.apply_files_filter(back_frame, back_frame.f_code.co_filename, False):
|
|
1818
2098
|
back_frame_cache_key = back_frame.f_code
|
|
1819
2099
|
cache_skips[back_frame_cache_key] = 1
|
|
1820
2100
|
# if DEBUG: print('skipped: trace_dispatch (filtered out: 1)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name)
|
|
1821
|
-
return None if event ==
|
|
2101
|
+
return None if event == "call" else NO_FTRACE
|
|
1822
2102
|
else:
|
|
1823
2103
|
# if DEBUG: print('skipped: trace_dispatch (filtered out: 2)', frame_cache_key, frame.f_lineno, event, frame.f_code.co_name)
|
|
1824
|
-
return None if event ==
|
|
2104
|
+
return None if event == "call" else NO_FTRACE
|
|
1825
2105
|
|
|
1826
2106
|
# if DEBUG: print('trace_dispatch', filename, frame.f_lineno, event, frame.f_code.co_name, file_type)
|
|
1827
2107
|
|
|
@@ -1829,28 +2109,35 @@ cdef class ThreadTracer:
|
|
|
1829
2109
|
# reference to the frame).
|
|
1830
2110
|
ret = PyDBFrame(
|
|
1831
2111
|
(
|
|
1832
|
-
py_db,
|
|
2112
|
+
py_db,
|
|
2113
|
+
abs_path_canonical_path_and_base,
|
|
2114
|
+
additional_info,
|
|
2115
|
+
t,
|
|
2116
|
+
frame_skips_cache,
|
|
2117
|
+
frame_cache_key,
|
|
1833
2118
|
)
|
|
1834
2119
|
).trace_dispatch(frame, event, arg)
|
|
1835
2120
|
if ret is None:
|
|
1836
2121
|
# 1 means skipped because of filters.
|
|
1837
2122
|
# 2 means skipped because no breakpoints were hit.
|
|
1838
2123
|
cache_skips[frame_cache_key] = 2
|
|
1839
|
-
return None if event ==
|
|
2124
|
+
return None if event == "call" else NO_FTRACE
|
|
1840
2125
|
|
|
2126
|
+
# fmt: off
|
|
1841
2127
|
# IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated)
|
|
1842
2128
|
frame.f_trace = SafeCallWrapper(ret) # Make sure we keep the returned tracer.
|
|
1843
2129
|
# ELSE
|
|
1844
2130
|
# frame.f_trace = ret # Make sure we keep the returned tracer.
|
|
1845
2131
|
# ENDIF
|
|
2132
|
+
# fmt: on
|
|
1846
2133
|
return ret
|
|
1847
2134
|
|
|
1848
2135
|
except SystemExit:
|
|
1849
|
-
return None if event ==
|
|
2136
|
+
return None if event == "call" else NO_FTRACE
|
|
1850
2137
|
|
|
1851
2138
|
except Exception:
|
|
1852
2139
|
if py_db.pydb_disposed:
|
|
1853
|
-
return None if event ==
|
|
2140
|
+
return None if event == "call" else NO_FTRACE # Don't log errors when we're shutting down.
|
|
1854
2141
|
# Log it
|
|
1855
2142
|
try:
|
|
1856
2143
|
if pydev_log_exception is not None:
|
|
@@ -1860,7 +2147,7 @@ cdef class ThreadTracer:
|
|
|
1860
2147
|
# Error logging? We're really in the interpreter shutdown...
|
|
1861
2148
|
# (https://github.com/fabioz/PyDev.Debugger/issues/8)
|
|
1862
2149
|
pass
|
|
1863
|
-
return None if event ==
|
|
2150
|
+
return None if event == "call" else NO_FTRACE
|
|
1864
2151
|
finally:
|
|
1865
2152
|
additional_info.is_tracing -= 1
|
|
1866
2153
|
|
|
@@ -1882,3 +2169,8 @@ if USE_CUSTOM_SYS_CURRENT_FRAMES_MAP:
|
|
|
1882
2169
|
return _original_call(self, frame, event, arg)
|
|
1883
2170
|
|
|
1884
2171
|
ThreadTracer.__call__ = __call__
|
|
2172
|
+
|
|
2173
|
+
if PYDEVD_USE_SYS_MONITORING:
|
|
2174
|
+
|
|
2175
|
+
def fix_top_level_trace_and_get_trace_func(*args, **kwargs):
|
|
2176
|
+
raise RuntimeError("Not used in sys.monitoring mode.")
|