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
|
@@ -4,13 +4,20 @@ import re
|
|
|
4
4
|
|
|
5
5
|
from _pydev_bundle import pydev_log
|
|
6
6
|
from _pydevd_bundle import pydevd_dont_trace
|
|
7
|
-
from _pydevd_bundle.pydevd_constants import (
|
|
8
|
-
|
|
7
|
+
from _pydevd_bundle.pydevd_constants import (
|
|
8
|
+
RETURN_VALUES_DICT,
|
|
9
|
+
NO_FTRACE,
|
|
10
|
+
EXCEPTION_TYPE_HANDLED,
|
|
11
|
+
EXCEPTION_TYPE_USER_UNHANDLED,
|
|
12
|
+
PYDEVD_IPYTHON_CONTEXT,
|
|
13
|
+
PYDEVD_USE_SYS_MONITORING,
|
|
14
|
+
)
|
|
9
15
|
from _pydevd_bundle.pydevd_frame_utils import add_exception_to_frame, just_raised, remove_exception_from_frame, ignore_exception_trace
|
|
10
16
|
from _pydevd_bundle.pydevd_utils import get_clsname_for_code
|
|
11
17
|
from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame
|
|
12
18
|
from _pydevd_bundle.pydevd_comm_constants import constant_to_str, CMD_SET_FUNCTION_BREAK
|
|
13
19
|
import sys
|
|
20
|
+
|
|
14
21
|
try:
|
|
15
22
|
from _pydevd_bundle.pydevd_bytecode_utils import get_smart_step_into_variant_from_frame_offset
|
|
16
23
|
except ImportError:
|
|
@@ -18,6 +25,7 @@ except ImportError:
|
|
|
18
25
|
def get_smart_step_into_variant_from_frame_offset(*args, **kwargs):
|
|
19
26
|
return None
|
|
20
27
|
|
|
28
|
+
|
|
21
29
|
# IFDEF CYTHON
|
|
22
30
|
# cython_inline_constant: CMD_STEP_INTO = 107
|
|
23
31
|
# cython_inline_constant: CMD_STEP_INTO_MY_CODE = 144
|
|
@@ -49,10 +57,10 @@ STATE_SUSPEND = 2
|
|
|
49
57
|
|
|
50
58
|
basename = os.path.basename
|
|
51
59
|
|
|
52
|
-
IGNORE_EXCEPTION_TAG = re.compile(
|
|
53
|
-
DEBUG_START = (
|
|
54
|
-
DEBUG_START_PY3K = (
|
|
55
|
-
TRACE_PROPERTY =
|
|
60
|
+
IGNORE_EXCEPTION_TAG = re.compile("[^#]*#.*@IgnoreException")
|
|
61
|
+
DEBUG_START = ("pydevd.py", "run")
|
|
62
|
+
DEBUG_START_PY3K = ("_pydev_execfile.py", "execfile")
|
|
63
|
+
TRACE_PROPERTY = "pydevd_traceproperty.py"
|
|
56
64
|
|
|
57
65
|
import dis
|
|
58
66
|
|
|
@@ -63,10 +71,10 @@ except NameError:
|
|
|
63
71
|
|
|
64
72
|
|
|
65
73
|
# IFDEF CYTHON
|
|
66
|
-
#
|
|
74
|
+
# def is_unhandled_exception(container_obj, py_db, frame, int last_raise_line, set raise_lines):
|
|
67
75
|
# ELSE
|
|
68
76
|
def is_unhandled_exception(container_obj, py_db, frame, last_raise_line, raise_lines):
|
|
69
|
-
# ENDIF
|
|
77
|
+
# ENDIF
|
|
70
78
|
if frame.f_lineno in raise_lines:
|
|
71
79
|
return True
|
|
72
80
|
|
|
@@ -95,10 +103,7 @@ def is_unhandled_exception(container_obj, py_db, frame, last_raise_line, raise_l
|
|
|
95
103
|
# and it's gotten in the except line.
|
|
96
104
|
for try_except_info in try_except_infos:
|
|
97
105
|
if try_except_info.is_line_in_except_block(frame.f_lineno):
|
|
98
|
-
if
|
|
99
|
-
frame.f_lineno == try_except_info.except_line or
|
|
100
|
-
frame.f_lineno in try_except_info.raise_lines_in_except
|
|
101
|
-
):
|
|
106
|
+
if frame.f_lineno == try_except_info.except_line or frame.f_lineno in try_except_info.raise_lines_in_except:
|
|
102
107
|
# In a raise inside a try..except block or some except which doesn't
|
|
103
108
|
# match the raised exception.
|
|
104
109
|
return True
|
|
@@ -112,50 +117,54 @@ def is_unhandled_exception(container_obj, py_db, frame, last_raise_line, raise_l
|
|
|
112
117
|
# self.try_except_infos = None
|
|
113
118
|
# ELSE
|
|
114
119
|
class _TryExceptContainerObj(object):
|
|
115
|
-
|
|
116
|
-
A dumb container object just to
|
|
117
|
-
|
|
118
|
-
|
|
120
|
+
"""
|
|
121
|
+
A dumb container object just to contain the try..except info when needed. Meant to be
|
|
122
|
+
persistent among multiple PyDBFrames to the same code object.
|
|
123
|
+
"""
|
|
124
|
+
|
|
119
125
|
try_except_infos = None
|
|
126
|
+
|
|
127
|
+
|
|
120
128
|
# ENDIF
|
|
121
129
|
|
|
122
130
|
|
|
123
|
-
|
|
131
|
+
# =======================================================================================================================
|
|
124
132
|
# PyDBFrame
|
|
125
|
-
|
|
133
|
+
# =======================================================================================================================
|
|
126
134
|
# IFDEF CYTHON
|
|
127
135
|
# cdef class PyDBFrame:
|
|
128
136
|
# ELSE
|
|
129
137
|
class PyDBFrame:
|
|
130
|
-
|
|
138
|
+
"""This makes the tracing for a given frame, so, the trace_dispatch
|
|
131
139
|
is used initially when we enter into a new context ('call') and then
|
|
132
140
|
is reused for the entire context.
|
|
133
|
-
|
|
134
|
-
# ENDIF
|
|
135
|
-
|
|
136
|
-
# Note: class (and not instance) attributes.
|
|
141
|
+
"""
|
|
137
142
|
|
|
138
|
-
#
|
|
139
|
-
# considers the user input (so, the actual result must be a join of both).
|
|
140
|
-
filename_to_lines_where_exceptions_are_ignored = {}
|
|
141
|
-
filename_to_stat_info = {}
|
|
143
|
+
# ENDIF
|
|
142
144
|
|
|
143
145
|
# IFDEF CYTHON
|
|
144
146
|
# cdef tuple _args
|
|
145
147
|
# cdef int should_skip
|
|
146
148
|
# cdef object exc_info
|
|
147
149
|
# def __init__(self, tuple args):
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
150
|
+
# self._args = args # In the cython version we don't need to pass the frame
|
|
151
|
+
# self.should_skip = -1 # On cythonized version, put in instance.
|
|
152
|
+
# self.exc_info = ()
|
|
151
153
|
# ELSE
|
|
152
154
|
should_skip = -1 # Default value in class (put in instance on set).
|
|
153
155
|
exc_info = () # Default value in class (put in instance on set).
|
|
154
156
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
157
|
+
if PYDEVD_USE_SYS_MONITORING:
|
|
158
|
+
|
|
159
|
+
def __init__(self, *args, **kwargs):
|
|
160
|
+
raise RuntimeError("Not expected to be used in sys.monitoring.")
|
|
161
|
+
|
|
162
|
+
else:
|
|
163
|
+
|
|
164
|
+
def __init__(self, args):
|
|
165
|
+
# args = py_db, abs_path_canonical_path_and_base, base, info, t, frame
|
|
166
|
+
# yeap, much faster than putting in self and then getting it from self later on
|
|
167
|
+
self._args = args
|
|
159
168
|
# ENDIF
|
|
160
169
|
|
|
161
170
|
def set_suspend(self, *args, **kwargs):
|
|
@@ -170,291 +179,42 @@ class PyDBFrame:
|
|
|
170
179
|
# cdef tuple exc_info;
|
|
171
180
|
# ELSE
|
|
172
181
|
def trace_exception(self, frame, event, arg):
|
|
173
|
-
|
|
174
|
-
if event ==
|
|
175
|
-
should_stop, frame = self.
|
|
182
|
+
# ENDIF
|
|
183
|
+
if event == "exception":
|
|
184
|
+
should_stop, frame, exc_info = should_stop_on_exception(self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info)
|
|
185
|
+
self.exc_info = exc_info
|
|
176
186
|
|
|
177
187
|
if should_stop:
|
|
178
|
-
if self.
|
|
188
|
+
if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED):
|
|
179
189
|
return self.trace_dispatch
|
|
180
190
|
|
|
181
|
-
elif event ==
|
|
191
|
+
elif event == "return":
|
|
182
192
|
exc_info = self.exc_info
|
|
183
193
|
if exc_info and arg is None:
|
|
184
194
|
frame_skips_cache, frame_cache_key = self._args[4], self._args[5]
|
|
185
|
-
custom_key = (frame_cache_key,
|
|
195
|
+
custom_key = (frame_cache_key, "try_exc_info")
|
|
186
196
|
container_obj = frame_skips_cache.get(custom_key)
|
|
187
197
|
if container_obj is None:
|
|
188
198
|
container_obj = frame_skips_cache[custom_key] = _TryExceptContainerObj()
|
|
189
|
-
if is_unhandled_exception(container_obj, self._args[0], frame, exc_info[1], exc_info[2]) and
|
|
190
|
-
|
|
199
|
+
if is_unhandled_exception(container_obj, self._args[0], frame, exc_info[1], exc_info[2]) and self.handle_user_exception(
|
|
200
|
+
frame
|
|
201
|
+
):
|
|
191
202
|
return self.trace_dispatch
|
|
192
203
|
|
|
193
204
|
return self.trace_exception
|
|
194
205
|
|
|
195
|
-
# IFDEF CYTHON
|
|
196
|
-
# cdef _should_stop_on_exception(self, frame, str event, arg):
|
|
197
|
-
# cdef PyDBAdditionalThreadInfo info;
|
|
198
|
-
# cdef bint should_stop;
|
|
199
|
-
# cdef bint was_just_raised;
|
|
200
|
-
# cdef list check_excs;
|
|
201
|
-
# ELSE
|
|
202
|
-
def _should_stop_on_exception(self, frame, event, arg):
|
|
203
|
-
# ENDIF
|
|
204
|
-
|
|
205
|
-
# main_debugger, _filename, info, _thread = self._args
|
|
206
|
-
main_debugger = self._args[0]
|
|
207
|
-
info = self._args[2]
|
|
208
|
-
should_stop = False
|
|
209
|
-
|
|
210
|
-
# STATE_SUSPEND = 2
|
|
211
|
-
if info.pydev_state != 2: # and breakpoint is not None:
|
|
212
|
-
exception, value, trace = arg
|
|
213
|
-
|
|
214
|
-
if trace is not None and hasattr(trace, 'tb_next'):
|
|
215
|
-
# on jython trace is None on the first event and it may not have a tb_next.
|
|
216
|
-
|
|
217
|
-
should_stop = False
|
|
218
|
-
exception_breakpoint = None
|
|
219
|
-
try:
|
|
220
|
-
if main_debugger.plugin is not None:
|
|
221
|
-
result = main_debugger.plugin.exception_break(main_debugger, self, frame, self._args, arg)
|
|
222
|
-
if result:
|
|
223
|
-
should_stop, frame = result
|
|
224
|
-
except:
|
|
225
|
-
pydev_log.exception()
|
|
226
|
-
|
|
227
|
-
if not should_stop:
|
|
228
|
-
# Apply checks that don't need the exception breakpoint (where we shouldn't ever stop).
|
|
229
|
-
if exception == SystemExit and main_debugger.ignore_system_exit_code(value):
|
|
230
|
-
pass
|
|
231
|
-
|
|
232
|
-
elif exception in (GeneratorExit, StopIteration, StopAsyncIteration):
|
|
233
|
-
# These exceptions are control-flow related (they work as a generator
|
|
234
|
-
# pause), so, we shouldn't stop on them.
|
|
235
|
-
pass
|
|
236
|
-
|
|
237
|
-
elif ignore_exception_trace(trace):
|
|
238
|
-
pass
|
|
239
|
-
|
|
240
|
-
else:
|
|
241
|
-
was_just_raised = trace.tb_next is None
|
|
242
|
-
|
|
243
|
-
# It was not handled by any plugin, lets check exception breakpoints.
|
|
244
|
-
check_excs = []
|
|
245
|
-
|
|
246
|
-
# Note: check user unhandled before regular exceptions.
|
|
247
|
-
exc_break_user = main_debugger.get_exception_breakpoint(
|
|
248
|
-
exception, main_debugger.break_on_user_uncaught_exceptions)
|
|
249
|
-
if exc_break_user is not None:
|
|
250
|
-
check_excs.append((exc_break_user, True))
|
|
251
|
-
|
|
252
|
-
exc_break_caught = main_debugger.get_exception_breakpoint(
|
|
253
|
-
exception, main_debugger.break_on_caught_exceptions)
|
|
254
|
-
if exc_break_caught is not None:
|
|
255
|
-
check_excs.append((exc_break_caught, False))
|
|
256
|
-
|
|
257
|
-
for exc_break, is_user_uncaught in check_excs:
|
|
258
|
-
# Initially mark that it should stop and then go into exclusions.
|
|
259
|
-
should_stop = True
|
|
260
|
-
|
|
261
|
-
if main_debugger.exclude_exception_by_filter(exc_break, trace):
|
|
262
|
-
pydev_log.debug("Ignore exception %s in library %s -- (%s)" % (exception, frame.f_code.co_filename, frame.f_code.co_name))
|
|
263
|
-
should_stop = False
|
|
264
|
-
|
|
265
|
-
elif exc_break.condition is not None and \
|
|
266
|
-
not main_debugger.handle_breakpoint_condition(info, exc_break, frame):
|
|
267
|
-
should_stop = False
|
|
268
|
-
|
|
269
|
-
elif is_user_uncaught:
|
|
270
|
-
# Note: we don't stop here, we just collect the exc_info to use later on...
|
|
271
|
-
should_stop = False
|
|
272
|
-
if not main_debugger.apply_files_filter(frame, frame.f_code.co_filename, True) \
|
|
273
|
-
and (frame.f_back is None or main_debugger.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)):
|
|
274
|
-
# User uncaught means that we're currently in user code but the code
|
|
275
|
-
# up the stack is library code.
|
|
276
|
-
exc_info = self.exc_info
|
|
277
|
-
if not exc_info:
|
|
278
|
-
exc_info = (arg, frame.f_lineno, set([frame.f_lineno]))
|
|
279
|
-
else:
|
|
280
|
-
lines = exc_info[2]
|
|
281
|
-
lines.add(frame.f_lineno)
|
|
282
|
-
exc_info = (arg, frame.f_lineno, lines)
|
|
283
|
-
self.exc_info = exc_info
|
|
284
|
-
else:
|
|
285
|
-
# I.e.: these are only checked if we're not dealing with user uncaught exceptions.
|
|
286
|
-
if exc_break.notify_on_first_raise_only and main_debugger.skip_on_exceptions_thrown_in_same_context \
|
|
287
|
-
and not was_just_raised and not just_raised(trace.tb_next):
|
|
288
|
-
# In this case we never stop if it was just raised, so, to know if it was the first we
|
|
289
|
-
# need to check if we're in the 2nd method.
|
|
290
|
-
should_stop = False # I.e.: we stop only when we're at the caller of a method that throws an exception
|
|
291
|
-
|
|
292
|
-
elif exc_break.notify_on_first_raise_only and not main_debugger.skip_on_exceptions_thrown_in_same_context \
|
|
293
|
-
and not was_just_raised:
|
|
294
|
-
should_stop = False # I.e.: we stop only when it was just raised
|
|
295
|
-
|
|
296
|
-
elif was_just_raised and main_debugger.skip_on_exceptions_thrown_in_same_context:
|
|
297
|
-
# Option: Don't break if an exception is caught in the same function from which it is thrown
|
|
298
|
-
should_stop = False
|
|
299
|
-
|
|
300
|
-
if should_stop:
|
|
301
|
-
exception_breakpoint = exc_break
|
|
302
|
-
try:
|
|
303
|
-
info.pydev_message = exc_break.qname
|
|
304
|
-
except:
|
|
305
|
-
info.pydev_message = exc_break.qname.encode('utf-8')
|
|
306
|
-
break
|
|
307
|
-
|
|
308
|
-
if should_stop:
|
|
309
|
-
# Always add exception to frame (must remove later after we proceed).
|
|
310
|
-
add_exception_to_frame(frame, (exception, value, trace))
|
|
311
|
-
|
|
312
|
-
if exception_breakpoint is not None and exception_breakpoint.expression is not None:
|
|
313
|
-
main_debugger.handle_breakpoint_expression(exception_breakpoint, info, frame)
|
|
314
|
-
|
|
315
|
-
return should_stop, frame
|
|
316
|
-
|
|
317
206
|
def handle_user_exception(self, frame):
|
|
318
207
|
exc_info = self.exc_info
|
|
319
208
|
if exc_info:
|
|
320
|
-
return self.
|
|
209
|
+
return handle_exception(self._args[0], self._args[3], frame, exc_info[0], EXCEPTION_TYPE_USER_UNHANDLED)
|
|
321
210
|
return False
|
|
322
211
|
|
|
323
|
-
# IFDEF CYTHON
|
|
324
|
-
# cdef _handle_exception(self, frame, str event, arg, str exception_type):
|
|
325
|
-
# cdef bint stopped;
|
|
326
|
-
# cdef tuple abs_real_path_and_base;
|
|
327
|
-
# cdef str absolute_filename;
|
|
328
|
-
# cdef str canonical_normalized_filename;
|
|
329
|
-
# cdef dict filename_to_lines_where_exceptions_are_ignored;
|
|
330
|
-
# cdef dict lines_ignored;
|
|
331
|
-
# cdef dict frame_id_to_frame;
|
|
332
|
-
# cdef dict merged;
|
|
333
|
-
# cdef object trace_obj;
|
|
334
|
-
# cdef object main_debugger;
|
|
335
|
-
# ELSE
|
|
336
|
-
def _handle_exception(self, frame, event, arg, exception_type):
|
|
337
|
-
# ENDIF
|
|
338
|
-
stopped = False
|
|
339
|
-
try:
|
|
340
|
-
# print('_handle_exception', frame.f_lineno, frame.f_code.co_name)
|
|
341
|
-
|
|
342
|
-
# We have 3 things in arg: exception type, description, traceback object
|
|
343
|
-
trace_obj = arg[2]
|
|
344
|
-
main_debugger = self._args[0]
|
|
345
|
-
|
|
346
|
-
initial_trace_obj = trace_obj
|
|
347
|
-
if trace_obj.tb_next is None and trace_obj.tb_frame is frame:
|
|
348
|
-
# 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).
|
|
349
|
-
pass
|
|
350
|
-
else:
|
|
351
|
-
# Get the trace_obj from where the exception was raised...
|
|
352
|
-
while trace_obj.tb_next is not None:
|
|
353
|
-
trace_obj = trace_obj.tb_next
|
|
354
|
-
|
|
355
|
-
if main_debugger.ignore_exceptions_thrown_in_lines_with_ignore_exception:
|
|
356
|
-
for check_trace_obj in (initial_trace_obj, trace_obj):
|
|
357
|
-
abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame)
|
|
358
|
-
absolute_filename = abs_real_path_and_base[0]
|
|
359
|
-
canonical_normalized_filename = abs_real_path_and_base[1]
|
|
360
|
-
|
|
361
|
-
filename_to_lines_where_exceptions_are_ignored = self.filename_to_lines_where_exceptions_are_ignored
|
|
362
|
-
|
|
363
|
-
lines_ignored = filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename)
|
|
364
|
-
if lines_ignored is None:
|
|
365
|
-
lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {}
|
|
366
|
-
|
|
367
|
-
try:
|
|
368
|
-
curr_stat = os.stat(absolute_filename)
|
|
369
|
-
curr_stat = (curr_stat.st_size, curr_stat.st_mtime)
|
|
370
|
-
except:
|
|
371
|
-
curr_stat = None
|
|
372
|
-
|
|
373
|
-
last_stat = self.filename_to_stat_info.get(absolute_filename)
|
|
374
|
-
if last_stat != curr_stat:
|
|
375
|
-
self.filename_to_stat_info[absolute_filename] = curr_stat
|
|
376
|
-
lines_ignored.clear()
|
|
377
|
-
try:
|
|
378
|
-
linecache.checkcache(absolute_filename)
|
|
379
|
-
except:
|
|
380
|
-
pydev_log.exception('Error in linecache.checkcache(%r)', absolute_filename)
|
|
381
|
-
|
|
382
|
-
from_user_input = main_debugger.filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename)
|
|
383
|
-
if from_user_input:
|
|
384
|
-
merged = {}
|
|
385
|
-
merged.update(lines_ignored)
|
|
386
|
-
# Override what we have with the related entries that the user entered
|
|
387
|
-
merged.update(from_user_input)
|
|
388
|
-
else:
|
|
389
|
-
merged = lines_ignored
|
|
390
|
-
|
|
391
|
-
exc_lineno = check_trace_obj.tb_lineno
|
|
392
|
-
|
|
393
|
-
# print ('lines ignored', lines_ignored)
|
|
394
|
-
# print ('user input', from_user_input)
|
|
395
|
-
# print ('merged', merged, 'curr', exc_lineno)
|
|
396
|
-
|
|
397
|
-
if exc_lineno not in merged: # Note: check on merged but update lines_ignored.
|
|
398
|
-
try:
|
|
399
|
-
line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals)
|
|
400
|
-
except:
|
|
401
|
-
pydev_log.exception('Error in linecache.getline(%r, %s, f_globals)', absolute_filename, exc_lineno)
|
|
402
|
-
line = ''
|
|
403
|
-
|
|
404
|
-
if IGNORE_EXCEPTION_TAG.match(line) is not None:
|
|
405
|
-
lines_ignored[exc_lineno] = 1
|
|
406
|
-
return False
|
|
407
|
-
else:
|
|
408
|
-
# Put in the cache saying not to ignore
|
|
409
|
-
lines_ignored[exc_lineno] = 0
|
|
410
|
-
else:
|
|
411
|
-
# Ok, dict has it already cached, so, let's check it...
|
|
412
|
-
if merged.get(exc_lineno, 0):
|
|
413
|
-
return False
|
|
414
|
-
|
|
415
|
-
thread = self._args[3]
|
|
416
|
-
|
|
417
|
-
try:
|
|
418
|
-
frame_id_to_frame = {}
|
|
419
|
-
frame_id_to_frame[id(frame)] = frame
|
|
420
|
-
f = trace_obj.tb_frame
|
|
421
|
-
while f is not None:
|
|
422
|
-
frame_id_to_frame[id(f)] = f
|
|
423
|
-
f = f.f_back
|
|
424
|
-
f = None
|
|
425
|
-
|
|
426
|
-
stopped = True
|
|
427
|
-
main_debugger.send_caught_exception_stack(thread, arg, id(frame))
|
|
428
|
-
try:
|
|
429
|
-
self.set_suspend(thread, CMD_STEP_CAUGHT_EXCEPTION)
|
|
430
|
-
self.do_wait_suspend(thread, frame, event, arg, exception_type=exception_type)
|
|
431
|
-
finally:
|
|
432
|
-
main_debugger.send_caught_exception_stack_proceeded(thread)
|
|
433
|
-
except:
|
|
434
|
-
pydev_log.exception()
|
|
435
|
-
|
|
436
|
-
main_debugger.set_trace_for_frame_and_parents(frame)
|
|
437
|
-
finally:
|
|
438
|
-
# Make sure the user cannot see the '__exception__' we added after we leave the suspend state.
|
|
439
|
-
remove_exception_from_frame(frame)
|
|
440
|
-
# Clear some local variables...
|
|
441
|
-
frame = None
|
|
442
|
-
trace_obj = None
|
|
443
|
-
initial_trace_obj = None
|
|
444
|
-
check_trace_obj = None
|
|
445
|
-
f = None
|
|
446
|
-
frame_id_to_frame = None
|
|
447
|
-
main_debugger = None
|
|
448
|
-
thread = None
|
|
449
|
-
|
|
450
|
-
return stopped
|
|
451
|
-
|
|
452
212
|
# IFDEF CYTHON
|
|
453
213
|
# cdef get_func_name(self, frame):
|
|
454
214
|
# cdef str func_name
|
|
455
215
|
# ELSE
|
|
456
216
|
def get_func_name(self, frame):
|
|
457
|
-
|
|
217
|
+
# ENDIF
|
|
458
218
|
code_obj = frame.f_code
|
|
459
219
|
func_name = code_obj.co_name
|
|
460
220
|
try:
|
|
@@ -471,7 +231,7 @@ class PyDBFrame:
|
|
|
471
231
|
# cdef _show_return_values(self, frame, arg):
|
|
472
232
|
# ELSE
|
|
473
233
|
def _show_return_values(self, frame, arg):
|
|
474
|
-
|
|
234
|
+
# ENDIF
|
|
475
235
|
try:
|
|
476
236
|
try:
|
|
477
237
|
f_locals_back = getattr(frame.f_back, "f_locals", None)
|
|
@@ -488,10 +248,10 @@ class PyDBFrame:
|
|
|
488
248
|
f_locals_back = None
|
|
489
249
|
|
|
490
250
|
# IFDEF CYTHON
|
|
491
|
-
# cdef _remove_return_values(self,
|
|
251
|
+
# cdef _remove_return_values(self, py_db, frame):
|
|
492
252
|
# ELSE
|
|
493
|
-
def _remove_return_values(self,
|
|
494
|
-
|
|
253
|
+
def _remove_return_values(self, py_db, frame):
|
|
254
|
+
# ENDIF
|
|
495
255
|
try:
|
|
496
256
|
try:
|
|
497
257
|
# Showing return values was turned off, we should remove them from locals dict.
|
|
@@ -507,17 +267,17 @@ class PyDBFrame:
|
|
|
507
267
|
f_locals_back = None
|
|
508
268
|
|
|
509
269
|
# IFDEF CYTHON
|
|
510
|
-
# cdef _get_unfiltered_back_frame(self,
|
|
270
|
+
# cdef _get_unfiltered_back_frame(self, py_db, frame):
|
|
511
271
|
# ELSE
|
|
512
|
-
def _get_unfiltered_back_frame(self,
|
|
513
|
-
|
|
272
|
+
def _get_unfiltered_back_frame(self, py_db, frame):
|
|
273
|
+
# ENDIF
|
|
514
274
|
f = frame.f_back
|
|
515
275
|
while f is not None:
|
|
516
|
-
if not
|
|
276
|
+
if not py_db.is_files_filter_enabled:
|
|
517
277
|
return f
|
|
518
278
|
|
|
519
279
|
else:
|
|
520
|
-
if
|
|
280
|
+
if py_db.apply_files_filter(f, f.f_code.co_filename, False):
|
|
521
281
|
f = f.f_back
|
|
522
282
|
|
|
523
283
|
else:
|
|
@@ -530,7 +290,7 @@ class PyDBFrame:
|
|
|
530
290
|
# cdef PyDBAdditionalThreadInfo info;
|
|
531
291
|
# ELSE
|
|
532
292
|
def _is_same_frame(self, target_frame, current_frame):
|
|
533
|
-
|
|
293
|
+
# ENDIF
|
|
534
294
|
if target_frame is current_frame:
|
|
535
295
|
return True
|
|
536
296
|
|
|
@@ -582,7 +342,7 @@ class PyDBFrame:
|
|
|
582
342
|
# cdef tuple pydev_smart_step_into_variants
|
|
583
343
|
# ELSE
|
|
584
344
|
def trace_dispatch(self, frame, event, arg):
|
|
585
|
-
|
|
345
|
+
# ENDIF
|
|
586
346
|
# Note: this is a big function because most of the logic related to hitting a breakpoint and
|
|
587
347
|
# stepping is contained in it. Ideally this could be split among multiple functions, but the
|
|
588
348
|
# problem in this case is that in pure-python function calls are expensive and even more so
|
|
@@ -592,8 +352,8 @@ class PyDBFrame:
|
|
|
592
352
|
# generation be better split among what each part does).
|
|
593
353
|
|
|
594
354
|
try:
|
|
595
|
-
# DEBUG = '
|
|
596
|
-
|
|
355
|
+
# DEBUG = '_debugger_case_yield_from.py' in frame.f_code.co_filename
|
|
356
|
+
py_db, abs_path_canonical_path_and_base, info, thread, frame_skips_cache, frame_cache_key = self._args
|
|
597
357
|
# 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))
|
|
598
358
|
info.is_tracing += 1
|
|
599
359
|
|
|
@@ -603,36 +363,35 @@ class PyDBFrame:
|
|
|
603
363
|
line = frame.f_lineno or 0 # Workaround or case where frame.f_lineno is None
|
|
604
364
|
line_cache_key = (frame_cache_key, line)
|
|
605
365
|
|
|
606
|
-
if
|
|
607
|
-
return None if event ==
|
|
366
|
+
if py_db.pydb_disposed:
|
|
367
|
+
return None if event == "call" else NO_FTRACE
|
|
608
368
|
|
|
609
|
-
plugin_manager =
|
|
369
|
+
plugin_manager = py_db.plugin
|
|
610
370
|
has_exception_breakpoints = (
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
or main_debugger.has_plugin_exception_breaks)
|
|
371
|
+
py_db.break_on_caught_exceptions or py_db.break_on_user_uncaught_exceptions or py_db.has_plugin_exception_breaks
|
|
372
|
+
)
|
|
614
373
|
|
|
615
374
|
stop_frame = info.pydev_step_stop
|
|
616
375
|
step_cmd = info.pydev_step_cmd
|
|
617
376
|
function_breakpoint_on_call_event = None
|
|
618
377
|
|
|
619
|
-
if frame.f_code.co_flags &
|
|
378
|
+
if frame.f_code.co_flags & 0xA0: # 0xa0 == CO_GENERATOR = 0x20 | CO_COROUTINE = 0x80
|
|
620
379
|
# Dealing with coroutines and generators:
|
|
621
380
|
# When in a coroutine we change the perceived event to the debugger because
|
|
622
381
|
# a call, StopIteration exception and return are usually just pausing/unpausing it.
|
|
623
|
-
if event ==
|
|
382
|
+
if event == "line":
|
|
624
383
|
is_line = True
|
|
625
384
|
is_call = False
|
|
626
385
|
is_return = False
|
|
627
386
|
is_exception_event = False
|
|
628
387
|
|
|
629
|
-
elif event ==
|
|
388
|
+
elif event == "return":
|
|
630
389
|
is_line = False
|
|
631
390
|
is_call = False
|
|
632
391
|
is_return = True
|
|
633
392
|
is_exception_event = False
|
|
634
393
|
|
|
635
|
-
returns_cache_key = (frame_cache_key,
|
|
394
|
+
returns_cache_key = (frame_cache_key, "returns")
|
|
636
395
|
return_lines = frame_skips_cache.get(returns_cache_key)
|
|
637
396
|
if return_lines is None:
|
|
638
397
|
# Note: we're collecting the return lines by inspecting the bytecode as
|
|
@@ -640,7 +399,7 @@ class PyDBFrame:
|
|
|
640
399
|
# it doesn't give any clear indication when a coroutine or generator is
|
|
641
400
|
# finishing or just pausing.
|
|
642
401
|
return_lines = set()
|
|
643
|
-
for x in
|
|
402
|
+
for x in py_db.collect_return_info(frame.f_code):
|
|
644
403
|
# Note: cython does not support closures in cpdefs (so we can't use
|
|
645
404
|
# a list comprehension).
|
|
646
405
|
return_lines.add(x.return_line)
|
|
@@ -673,7 +432,7 @@ class PyDBFrame:
|
|
|
673
432
|
# frame in this case).
|
|
674
433
|
if stop_frame is frame and not info.pydev_use_scoped_step_frame:
|
|
675
434
|
if step_cmd in (CMD_STEP_OVER, CMD_STEP_OVER_MY_CODE, CMD_STEP_INTO, CMD_STEP_INTO_MY_CODE):
|
|
676
|
-
f = self._get_unfiltered_back_frame(
|
|
435
|
+
f = self._get_unfiltered_back_frame(py_db, frame)
|
|
677
436
|
if f is not None:
|
|
678
437
|
info.pydev_step_cmd = CMD_STEP_INTO_COROUTINE
|
|
679
438
|
info.pydev_step_stop = f
|
|
@@ -688,19 +447,22 @@ class PyDBFrame:
|
|
|
688
447
|
|
|
689
448
|
elif step_cmd == CMD_STEP_INTO_COROUTINE:
|
|
690
449
|
# We're exiting this one, so, mark the new coroutine context.
|
|
691
|
-
f = self._get_unfiltered_back_frame(
|
|
450
|
+
f = self._get_unfiltered_back_frame(py_db, frame)
|
|
692
451
|
if f is not None:
|
|
693
452
|
info.pydev_step_stop = f
|
|
694
453
|
else:
|
|
695
454
|
info.pydev_step_cmd = CMD_STEP_INTO
|
|
696
455
|
info.pydev_step_stop = None
|
|
697
456
|
|
|
698
|
-
elif event ==
|
|
457
|
+
elif event == "exception":
|
|
699
458
|
breakpoints_for_file = None
|
|
700
459
|
if has_exception_breakpoints:
|
|
701
|
-
should_stop, frame =
|
|
460
|
+
should_stop, frame, exc_info = should_stop_on_exception(
|
|
461
|
+
self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info
|
|
462
|
+
)
|
|
463
|
+
self.exc_info = exc_info
|
|
702
464
|
if should_stop:
|
|
703
|
-
if self.
|
|
465
|
+
if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED):
|
|
704
466
|
return self.trace_dispatch
|
|
705
467
|
|
|
706
468
|
return self.trace_dispatch
|
|
@@ -709,13 +471,13 @@ class PyDBFrame:
|
|
|
709
471
|
return self.trace_dispatch
|
|
710
472
|
|
|
711
473
|
else: # Not coroutine nor generator
|
|
712
|
-
if event ==
|
|
474
|
+
if event == "line":
|
|
713
475
|
is_line = True
|
|
714
476
|
is_call = False
|
|
715
477
|
is_return = False
|
|
716
478
|
is_exception_event = False
|
|
717
479
|
|
|
718
|
-
elif event ==
|
|
480
|
+
elif event == "return":
|
|
719
481
|
is_line = False
|
|
720
482
|
is_return = True
|
|
721
483
|
is_call = False
|
|
@@ -728,11 +490,12 @@ class PyDBFrame:
|
|
|
728
490
|
# Note: this is especially troublesome when we're skipping code with the
|
|
729
491
|
# @DontTrace comment.
|
|
730
492
|
if (
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
493
|
+
stop_frame is frame
|
|
494
|
+
and not info.pydev_use_scoped_step_frame
|
|
495
|
+
and is_return
|
|
496
|
+
and step_cmd
|
|
497
|
+
in (CMD_STEP_OVER, CMD_STEP_RETURN, CMD_STEP_OVER_MY_CODE, CMD_STEP_RETURN_MY_CODE, CMD_SMART_STEP_INTO)
|
|
498
|
+
):
|
|
736
499
|
if step_cmd in (CMD_STEP_OVER, CMD_STEP_RETURN, CMD_SMART_STEP_INTO):
|
|
737
500
|
info.pydev_step_cmd = CMD_STEP_INTO
|
|
738
501
|
else:
|
|
@@ -743,21 +506,24 @@ class PyDBFrame:
|
|
|
743
506
|
if self.handle_user_exception(frame):
|
|
744
507
|
return self.trace_dispatch
|
|
745
508
|
|
|
746
|
-
elif event ==
|
|
509
|
+
elif event == "call":
|
|
747
510
|
is_line = False
|
|
748
511
|
is_call = True
|
|
749
512
|
is_return = False
|
|
750
513
|
is_exception_event = False
|
|
751
514
|
if frame.f_code.co_firstlineno == frame.f_lineno: # Check line to deal with async/await.
|
|
752
|
-
function_breakpoint_on_call_event =
|
|
515
|
+
function_breakpoint_on_call_event = py_db.function_breakpoint_name_to_breakpoint.get(frame.f_code.co_name)
|
|
753
516
|
|
|
754
|
-
elif event ==
|
|
517
|
+
elif event == "exception":
|
|
755
518
|
is_exception_event = True
|
|
756
519
|
breakpoints_for_file = None
|
|
757
520
|
if has_exception_breakpoints:
|
|
758
|
-
should_stop, frame =
|
|
521
|
+
should_stop, frame, exc_info = should_stop_on_exception(
|
|
522
|
+
self._args[0], self._args[2], frame, self._args[3], arg, self.exc_info
|
|
523
|
+
)
|
|
524
|
+
self.exc_info = exc_info
|
|
759
525
|
if should_stop:
|
|
760
|
-
if self.
|
|
526
|
+
if handle_exception(self._args[0], self._args[3], frame, arg, EXCEPTION_TYPE_HANDLED):
|
|
761
527
|
return self.trace_dispatch
|
|
762
528
|
is_line = False
|
|
763
529
|
is_return = False
|
|
@@ -768,7 +534,7 @@ class PyDBFrame:
|
|
|
768
534
|
return self.trace_dispatch
|
|
769
535
|
|
|
770
536
|
if not is_exception_event:
|
|
771
|
-
breakpoints_for_file =
|
|
537
|
+
breakpoints_for_file = py_db.breakpoints.get(abs_path_canonical_path_and_base[1])
|
|
772
538
|
|
|
773
539
|
can_skip = False
|
|
774
540
|
|
|
@@ -780,22 +546,27 @@ class PyDBFrame:
|
|
|
780
546
|
if step_cmd == -1:
|
|
781
547
|
can_skip = True
|
|
782
548
|
|
|
783
|
-
elif step_cmd in (
|
|
549
|
+
elif step_cmd in (
|
|
550
|
+
CMD_STEP_OVER,
|
|
551
|
+
CMD_STEP_RETURN,
|
|
552
|
+
CMD_STEP_OVER_MY_CODE,
|
|
553
|
+
CMD_STEP_RETURN_MY_CODE,
|
|
554
|
+
) and not self._is_same_frame(stop_frame, frame):
|
|
784
555
|
can_skip = True
|
|
785
556
|
|
|
786
557
|
elif step_cmd == CMD_SMART_STEP_INTO and (
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
558
|
+
stop_frame is not None
|
|
559
|
+
and stop_frame is not frame
|
|
560
|
+
and stop_frame is not frame.f_back
|
|
561
|
+
and (frame.f_back is None or stop_frame is not frame.f_back.f_back)
|
|
562
|
+
):
|
|
791
563
|
can_skip = True
|
|
792
564
|
|
|
793
565
|
elif step_cmd == CMD_STEP_INTO_MY_CODE:
|
|
794
|
-
if (
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
can_skip = True
|
|
566
|
+
if py_db.apply_files_filter(frame, frame.f_code.co_filename, True) and (
|
|
567
|
+
frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)
|
|
568
|
+
):
|
|
569
|
+
can_skip = True
|
|
799
570
|
|
|
800
571
|
elif step_cmd == CMD_STEP_INTO_COROUTINE:
|
|
801
572
|
f = frame
|
|
@@ -807,11 +578,15 @@ class PyDBFrame:
|
|
|
807
578
|
can_skip = True
|
|
808
579
|
|
|
809
580
|
if can_skip:
|
|
810
|
-
if plugin_manager is not None and (
|
|
811
|
-
|
|
812
|
-
can_skip = plugin_manager.can_skip(main_debugger, frame)
|
|
581
|
+
if plugin_manager is not None and (py_db.has_plugin_line_breaks or py_db.has_plugin_exception_breaks):
|
|
582
|
+
can_skip = plugin_manager.can_skip(py_db, frame)
|
|
813
583
|
|
|
814
|
-
if
|
|
584
|
+
if (
|
|
585
|
+
can_skip
|
|
586
|
+
and py_db.show_return_values
|
|
587
|
+
and info.pydev_step_cmd in (CMD_STEP_OVER, CMD_STEP_OVER_MY_CODE)
|
|
588
|
+
and self._is_same_frame(stop_frame, frame.f_back)
|
|
589
|
+
):
|
|
815
590
|
# trace function for showing return values after step over
|
|
816
591
|
can_skip = False
|
|
817
592
|
|
|
@@ -859,12 +634,12 @@ class PyDBFrame:
|
|
|
859
634
|
curr_func_name = frame.f_code.co_name
|
|
860
635
|
|
|
861
636
|
# global context is set with an empty name
|
|
862
|
-
if curr_func_name in (
|
|
863
|
-
curr_func_name =
|
|
637
|
+
if curr_func_name in ("?", "<module>", "<lambda>"):
|
|
638
|
+
curr_func_name = ""
|
|
864
639
|
|
|
865
640
|
for bp in breakpoints_for_file.values():
|
|
866
641
|
# will match either global or some function
|
|
867
|
-
if bp.func_name in (
|
|
642
|
+
if bp.func_name in ("None", curr_func_name):
|
|
868
643
|
has_breakpoint_in_frame = True
|
|
869
644
|
break
|
|
870
645
|
else:
|
|
@@ -910,26 +685,29 @@ class PyDBFrame:
|
|
|
910
685
|
new_frame = frame
|
|
911
686
|
stop = True
|
|
912
687
|
|
|
913
|
-
elif plugin_manager is not None and
|
|
914
|
-
result = plugin_manager.get_breakpoint(
|
|
688
|
+
elif plugin_manager is not None and py_db.has_plugin_line_breaks:
|
|
689
|
+
result = plugin_manager.get_breakpoint(py_db, frame, event, self._args[2])
|
|
915
690
|
if result:
|
|
916
|
-
stop_on_plugin_breakpoint
|
|
691
|
+
stop_on_plugin_breakpoint = True
|
|
692
|
+
breakpoint, new_frame, bp_type = result
|
|
917
693
|
|
|
918
694
|
if breakpoint:
|
|
919
695
|
# ok, hit breakpoint, now, we have to discover if it is a conditional breakpoint
|
|
920
696
|
# lets do the conditional stuff here
|
|
921
697
|
if breakpoint.expression is not None:
|
|
922
|
-
|
|
698
|
+
py_db.handle_breakpoint_expression(breakpoint, info, new_frame)
|
|
923
699
|
|
|
924
700
|
if stop or stop_on_plugin_breakpoint:
|
|
925
701
|
eval_result = False
|
|
926
702
|
if breakpoint.has_condition:
|
|
927
|
-
eval_result =
|
|
703
|
+
eval_result = py_db.handle_breakpoint_condition(info, breakpoint, new_frame)
|
|
928
704
|
if not eval_result:
|
|
929
705
|
stop = False
|
|
930
706
|
stop_on_plugin_breakpoint = False
|
|
931
707
|
|
|
932
|
-
if is_call and (
|
|
708
|
+
if is_call and (
|
|
709
|
+
frame.f_code.co_name in ("<lambda>", "<module>") or (line == 1 and frame.f_code.co_name.startswith("<cell"))
|
|
710
|
+
):
|
|
933
711
|
# If we find a call for a module, it means that the module is being imported/executed for the
|
|
934
712
|
# first time. In this case we have to ignore this hit as it may later duplicated by a
|
|
935
713
|
# line event at the same place (so, if there's a module with a print() in the first line
|
|
@@ -949,27 +727,30 @@ class PyDBFrame:
|
|
|
949
727
|
stop_on_plugin_breakpoint = False
|
|
950
728
|
|
|
951
729
|
if info.pydev_message is not None and len(info.pydev_message) > 0:
|
|
952
|
-
cmd =
|
|
953
|
-
|
|
730
|
+
cmd = py_db.cmd_factory.make_io_message(info.pydev_message + os.linesep, "1")
|
|
731
|
+
py_db.writer.add_command(cmd)
|
|
954
732
|
|
|
955
|
-
if
|
|
733
|
+
if py_db.show_return_values:
|
|
956
734
|
if is_return and (
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
(
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
735
|
+
(
|
|
736
|
+
info.pydev_step_cmd in (CMD_STEP_OVER, CMD_STEP_OVER_MY_CODE, CMD_SMART_STEP_INTO)
|
|
737
|
+
and (self._is_same_frame(stop_frame, frame.f_back))
|
|
738
|
+
)
|
|
739
|
+
or (info.pydev_step_cmd in (CMD_STEP_RETURN, CMD_STEP_RETURN_MY_CODE) and (self._is_same_frame(stop_frame, frame)))
|
|
740
|
+
or (info.pydev_step_cmd in (CMD_STEP_INTO, CMD_STEP_INTO_COROUTINE))
|
|
741
|
+
or (
|
|
742
|
+
info.pydev_step_cmd == CMD_STEP_INTO_MY_CODE
|
|
743
|
+
and frame.f_back is not None
|
|
744
|
+
and not py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)
|
|
745
|
+
)
|
|
746
|
+
):
|
|
966
747
|
self._show_return_values(frame, arg)
|
|
967
748
|
|
|
968
|
-
elif
|
|
749
|
+
elif py_db.remove_return_values_flag:
|
|
969
750
|
try:
|
|
970
|
-
self._remove_return_values(
|
|
751
|
+
self._remove_return_values(py_db, frame)
|
|
971
752
|
finally:
|
|
972
|
-
|
|
753
|
+
py_db.remove_return_values_flag = False
|
|
973
754
|
|
|
974
755
|
if stop:
|
|
975
756
|
self.set_suspend(
|
|
@@ -979,7 +760,7 @@ class PyDBFrame:
|
|
|
979
760
|
)
|
|
980
761
|
|
|
981
762
|
elif stop_on_plugin_breakpoint and plugin_manager is not None:
|
|
982
|
-
result = plugin_manager.suspend(
|
|
763
|
+
result = plugin_manager.suspend(py_db, thread, frame, bp_type)
|
|
983
764
|
if result:
|
|
984
765
|
frame = result
|
|
985
766
|
|
|
@@ -996,9 +777,14 @@ class PyDBFrame:
|
|
|
996
777
|
# Unfortunately Python itself stops the tracing when it originates from
|
|
997
778
|
# the tracing function, so, we can't do much about it (just let the user know).
|
|
998
779
|
exc = sys.exc_info()[0]
|
|
999
|
-
cmd =
|
|
1000
|
-
|
|
1001
|
-
|
|
780
|
+
cmd = py_db.cmd_factory.make_console_message(
|
|
781
|
+
"%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n"
|
|
782
|
+
% (
|
|
783
|
+
exc,
|
|
784
|
+
thread,
|
|
785
|
+
)
|
|
786
|
+
)
|
|
787
|
+
py_db.writer.add_command(cmd)
|
|
1002
788
|
if not issubclass(exc, (KeyboardInterrupt, SystemExit)):
|
|
1003
789
|
pydev_log.exception()
|
|
1004
790
|
|
|
@@ -1012,7 +798,7 @@ class PyDBFrame:
|
|
|
1012
798
|
# I.e.: cache the result on self.should_skip (no need to evaluate the same frame multiple times).
|
|
1013
799
|
# Note that on a code reload, we won't re-evaluate this because in practice, the frame.f_code
|
|
1014
800
|
# Which will be handled by this frame is read-only, so, we can cache it safely.
|
|
1015
|
-
if not pydevd_dont_trace.should_trace_hook(frame, abs_path_canonical_path_and_base[0]):
|
|
801
|
+
if not pydevd_dont_trace.should_trace_hook(frame.f_code, abs_path_canonical_path_and_base[0]):
|
|
1016
802
|
# -1, 0, 1 to be Cython-friendly
|
|
1017
803
|
should_skip = self.should_skip = 1
|
|
1018
804
|
else:
|
|
@@ -1028,19 +814,19 @@ class PyDBFrame:
|
|
|
1028
814
|
force_check_project_scope = step_cmd == CMD_STEP_INTO_MY_CODE
|
|
1029
815
|
if is_line:
|
|
1030
816
|
if not info.pydev_use_scoped_step_frame:
|
|
1031
|
-
if force_check_project_scope or
|
|
1032
|
-
stop = not
|
|
817
|
+
if force_check_project_scope or py_db.is_files_filter_enabled:
|
|
818
|
+
stop = not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope)
|
|
1033
819
|
else:
|
|
1034
820
|
stop = True
|
|
1035
821
|
else:
|
|
1036
|
-
if force_check_project_scope or
|
|
822
|
+
if force_check_project_scope or py_db.is_files_filter_enabled:
|
|
1037
823
|
# Make sure we check the filtering inside ipython calls too...
|
|
1038
|
-
if not not
|
|
824
|
+
if not not py_db.apply_files_filter(frame, frame.f_code.co_filename, force_check_project_scope):
|
|
1039
825
|
return None if is_call else NO_FTRACE
|
|
1040
826
|
|
|
1041
827
|
# We can only stop inside the ipython call.
|
|
1042
828
|
filename = frame.f_code.co_filename
|
|
1043
|
-
if filename.endswith(
|
|
829
|
+
if filename.endswith(".pyc"):
|
|
1044
830
|
filename = filename[:-1]
|
|
1045
831
|
|
|
1046
832
|
if not filename.endswith(PYDEVD_IPYTHON_CONTEXT[0]):
|
|
@@ -1049,7 +835,7 @@ class PyDBFrame:
|
|
|
1049
835
|
if f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]:
|
|
1050
836
|
f2 = f.f_back
|
|
1051
837
|
if f2 is not None and f2.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]:
|
|
1052
|
-
pydev_log.debug(
|
|
838
|
+
pydev_log.debug("Stop inside ipython call")
|
|
1053
839
|
stop = True
|
|
1054
840
|
break
|
|
1055
841
|
f = f.f_back
|
|
@@ -1062,11 +848,13 @@ class PyDBFrame:
|
|
|
1062
848
|
return None if is_call else NO_FTRACE
|
|
1063
849
|
|
|
1064
850
|
elif is_return and frame.f_back is not None and not info.pydev_use_scoped_step_frame:
|
|
1065
|
-
if
|
|
851
|
+
if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE:
|
|
1066
852
|
stop = False
|
|
1067
853
|
else:
|
|
1068
|
-
if force_check_project_scope or
|
|
1069
|
-
stop = not
|
|
854
|
+
if force_check_project_scope or py_db.is_files_filter_enabled:
|
|
855
|
+
stop = not py_db.apply_files_filter(
|
|
856
|
+
frame.f_back, frame.f_back.f_code.co_filename, force_check_project_scope
|
|
857
|
+
)
|
|
1070
858
|
if stop:
|
|
1071
859
|
# Prevent stopping in a return to the same location we were initially
|
|
1072
860
|
# (i.e.: double-stop at the same place due to some filtering).
|
|
@@ -1089,7 +877,7 @@ class PyDBFrame:
|
|
|
1089
877
|
stop = False
|
|
1090
878
|
|
|
1091
879
|
if plugin_manager is not None:
|
|
1092
|
-
result = plugin_manager.cmd_step_into(
|
|
880
|
+
result = plugin_manager.cmd_step_into(py_db, frame, event, self._args[2], self._args[3], stop_info, stop)
|
|
1093
881
|
if result:
|
|
1094
882
|
stop, plugin_stop = result
|
|
1095
883
|
|
|
@@ -1102,7 +890,7 @@ class PyDBFrame:
|
|
|
1102
890
|
# i.e.: don't stop in: (stop_frame is frame.f_back and is_return) as we'd stop twice in that line.
|
|
1103
891
|
|
|
1104
892
|
if plugin_manager is not None:
|
|
1105
|
-
result = plugin_manager.cmd_step_over(
|
|
893
|
+
result = plugin_manager.cmd_step_over(py_db, frame, event, self._args[2], self._args[3], stop_info, stop)
|
|
1106
894
|
if result:
|
|
1107
895
|
stop, plugin_stop = result
|
|
1108
896
|
|
|
@@ -1126,16 +914,19 @@ class PyDBFrame:
|
|
|
1126
914
|
if pydev_smart_parent_offset >= 0 and pydev_smart_step_into_variants:
|
|
1127
915
|
# Preferred mode (when the smart step into variants are available
|
|
1128
916
|
# and the offset is set).
|
|
1129
|
-
stop = get_smart_step_into_variant_from_frame_offset(
|
|
1130
|
-
|
|
917
|
+
stop = get_smart_step_into_variant_from_frame_offset(
|
|
918
|
+
back.f_lasti, pydev_smart_step_into_variants
|
|
919
|
+
) is get_smart_step_into_variant_from_frame_offset(
|
|
920
|
+
pydev_smart_parent_offset, pydev_smart_step_into_variants
|
|
921
|
+
)
|
|
1131
922
|
|
|
1132
923
|
else:
|
|
1133
924
|
# Only the name/line is available, so, check that.
|
|
1134
925
|
curr_func_name = frame.f_code.co_name
|
|
1135
926
|
|
|
1136
927
|
# global context is set with an empty name
|
|
1137
|
-
if curr_func_name in (
|
|
1138
|
-
curr_func_name =
|
|
928
|
+
if curr_func_name in ("?", "<module>") or curr_func_name is None:
|
|
929
|
+
curr_func_name = ""
|
|
1139
930
|
if curr_func_name == info.pydev_func_name and stop_frame.f_lineno == info.pydev_next_line:
|
|
1140
931
|
stop = True
|
|
1141
932
|
|
|
@@ -1162,13 +953,15 @@ class PyDBFrame:
|
|
|
1162
953
|
# the child (because this is a generator, the parent may have moved forward
|
|
1163
954
|
# already -- and that's ok, so, we just check that the parent frame
|
|
1164
955
|
# matches in this case).
|
|
1165
|
-
smart_step_into_variant = get_smart_step_into_variant_from_frame_offset(
|
|
956
|
+
smart_step_into_variant = get_smart_step_into_variant_from_frame_offset(
|
|
957
|
+
pydev_smart_parent_offset, pydev_smart_step_into_variants
|
|
958
|
+
)
|
|
1166
959
|
# print('matched parent offset', pydev_smart_parent_offset)
|
|
1167
960
|
# Ok, now, check the child variant
|
|
1168
961
|
children_variants = smart_step_into_variant.children_variants
|
|
1169
962
|
stop = children_variants and (
|
|
1170
|
-
get_smart_step_into_variant_from_frame_offset(back.f_lasti, children_variants)
|
|
1171
|
-
get_smart_step_into_variant_from_frame_offset(pydev_smart_child_offset, children_variants)
|
|
963
|
+
get_smart_step_into_variant_from_frame_offset(back.f_lasti, children_variants)
|
|
964
|
+
is get_smart_step_into_variant_from_frame_offset(pydev_smart_child_offset, children_variants)
|
|
1172
965
|
)
|
|
1173
966
|
# print('stop at child', stop)
|
|
1174
967
|
|
|
@@ -1184,13 +977,13 @@ class PyDBFrame:
|
|
|
1184
977
|
stop = False
|
|
1185
978
|
|
|
1186
979
|
if stop and step_cmd != -1 and is_return and hasattr(frame, "f_back"):
|
|
1187
|
-
f_code = getattr(frame.f_back,
|
|
980
|
+
f_code = getattr(frame.f_back, "f_code", None)
|
|
1188
981
|
if f_code is not None:
|
|
1189
|
-
if
|
|
982
|
+
if py_db.get_file_type(frame.f_back) == py_db.PYDEV_FILE:
|
|
1190
983
|
stop = False
|
|
1191
984
|
|
|
1192
985
|
if plugin_stop:
|
|
1193
|
-
|
|
986
|
+
plugin_manager.stop(py_db, frame, event, self._args[3], stop_info, arg, step_cmd)
|
|
1194
987
|
elif stop:
|
|
1195
988
|
if is_line:
|
|
1196
989
|
self.set_suspend(thread, step_cmd, original_step_cmd=info.pydev_original_step_cmd)
|
|
@@ -1211,13 +1004,13 @@ class PyDBFrame:
|
|
|
1211
1004
|
return None if is_call else NO_FTRACE
|
|
1212
1005
|
|
|
1213
1006
|
elif pydevd_dont_trace.should_trace_hook is not None:
|
|
1214
|
-
if not pydevd_dont_trace.should_trace_hook(back, back_absolute_filename):
|
|
1007
|
+
if not pydevd_dont_trace.should_trace_hook(back.f_code, back_absolute_filename):
|
|
1215
1008
|
# In this case, we'll have to skip the previous one because it shouldn't be traced.
|
|
1216
1009
|
# Also, we have to reset the tracing, because if the parent's parent (or some
|
|
1217
1010
|
# other parent) has to be traced and it's not currently, we wouldn't stop where
|
|
1218
1011
|
# we should anymore (so, a step in/over/return may not stop anywhere if no parent is traced).
|
|
1219
1012
|
# Related test: _debugger_case17a.py
|
|
1220
|
-
|
|
1013
|
+
py_db.set_trace_for_frame_and_parents(thread.ident, back)
|
|
1221
1014
|
return None if is_call else NO_FTRACE
|
|
1222
1015
|
|
|
1223
1016
|
if back is not None:
|
|
@@ -1230,9 +1023,10 @@ class PyDBFrame:
|
|
|
1230
1023
|
info.pydev_original_step_cmd = -1
|
|
1231
1024
|
info.pydev_step_cmd = -1
|
|
1232
1025
|
info.pydev_state = STATE_RUN
|
|
1026
|
+
info.update_stepping_info()
|
|
1233
1027
|
|
|
1234
1028
|
# if we are quitting, let's stop the tracing
|
|
1235
|
-
if
|
|
1029
|
+
if py_db.quitting:
|
|
1236
1030
|
return None if is_call else NO_FTRACE
|
|
1237
1031
|
|
|
1238
1032
|
return self.trace_dispatch
|
|
@@ -1240,9 +1034,14 @@ class PyDBFrame:
|
|
|
1240
1034
|
# Unfortunately Python itself stops the tracing when it originates from
|
|
1241
1035
|
# the tracing function, so, we can't do much about it (just let the user know).
|
|
1242
1036
|
exc = sys.exc_info()[0]
|
|
1243
|
-
cmd =
|
|
1244
|
-
|
|
1245
|
-
|
|
1037
|
+
cmd = py_db.cmd_factory.make_console_message(
|
|
1038
|
+
"%s raised from within the callback set in sys.settrace.\nDebugging will be disabled for this thread (%s).\n"
|
|
1039
|
+
% (
|
|
1040
|
+
exc,
|
|
1041
|
+
thread,
|
|
1042
|
+
)
|
|
1043
|
+
)
|
|
1044
|
+
py_db.writer.add_command(cmd)
|
|
1246
1045
|
if not issubclass(exc, (KeyboardInterrupt, SystemExit)):
|
|
1247
1046
|
pydev_log.exception()
|
|
1248
1047
|
raise
|
|
@@ -1251,3 +1050,259 @@ class PyDBFrame:
|
|
|
1251
1050
|
info.is_tracing -= 1
|
|
1252
1051
|
|
|
1253
1052
|
# end trace_dispatch
|
|
1053
|
+
|
|
1054
|
+
|
|
1055
|
+
# IFDEF CYTHON
|
|
1056
|
+
# def should_stop_on_exception(py_db, PyDBAdditionalThreadInfo info, frame, thread, arg, prev_user_uncaught_exc_info):
|
|
1057
|
+
# cdef bint should_stop;
|
|
1058
|
+
# cdef bint was_just_raised;
|
|
1059
|
+
# cdef list check_excs;
|
|
1060
|
+
# ELSE
|
|
1061
|
+
def should_stop_on_exception(py_db, info, frame, thread, arg, prev_user_uncaught_exc_info):
|
|
1062
|
+
# ENDIF
|
|
1063
|
+
|
|
1064
|
+
should_stop = False
|
|
1065
|
+
maybe_user_uncaught_exc_info = prev_user_uncaught_exc_info
|
|
1066
|
+
|
|
1067
|
+
# STATE_SUSPEND = 2
|
|
1068
|
+
if info.pydev_state != 2: # and breakpoint is not None:
|
|
1069
|
+
exception, value, trace = arg
|
|
1070
|
+
|
|
1071
|
+
if trace is not None and hasattr(trace, "tb_next"):
|
|
1072
|
+
# on jython trace is None on the first event and it may not have a tb_next.
|
|
1073
|
+
|
|
1074
|
+
should_stop = False
|
|
1075
|
+
exception_breakpoint = None
|
|
1076
|
+
try:
|
|
1077
|
+
if py_db.plugin is not None:
|
|
1078
|
+
result = py_db.plugin.exception_break(py_db, frame, thread, arg)
|
|
1079
|
+
if result:
|
|
1080
|
+
should_stop, frame = result
|
|
1081
|
+
except:
|
|
1082
|
+
pydev_log.exception()
|
|
1083
|
+
|
|
1084
|
+
if not should_stop:
|
|
1085
|
+
# Apply checks that don't need the exception breakpoint (where we shouldn't ever stop).
|
|
1086
|
+
if exception == SystemExit and py_db.ignore_system_exit_code(value):
|
|
1087
|
+
pass
|
|
1088
|
+
|
|
1089
|
+
elif exception in (GeneratorExit, StopIteration, StopAsyncIteration):
|
|
1090
|
+
# These exceptions are control-flow related (they work as a generator
|
|
1091
|
+
# pause), so, we shouldn't stop on them.
|
|
1092
|
+
pass
|
|
1093
|
+
|
|
1094
|
+
elif ignore_exception_trace(trace):
|
|
1095
|
+
pass
|
|
1096
|
+
|
|
1097
|
+
else:
|
|
1098
|
+
was_just_raised = just_raised(trace)
|
|
1099
|
+
|
|
1100
|
+
# It was not handled by any plugin, lets check exception breakpoints.
|
|
1101
|
+
check_excs = []
|
|
1102
|
+
|
|
1103
|
+
# Note: check user unhandled before regular exceptions.
|
|
1104
|
+
exc_break_user = py_db.get_exception_breakpoint(exception, py_db.break_on_user_uncaught_exceptions)
|
|
1105
|
+
if exc_break_user is not None:
|
|
1106
|
+
check_excs.append((exc_break_user, True))
|
|
1107
|
+
|
|
1108
|
+
exc_break_caught = py_db.get_exception_breakpoint(exception, py_db.break_on_caught_exceptions)
|
|
1109
|
+
if exc_break_caught is not None:
|
|
1110
|
+
check_excs.append((exc_break_caught, False))
|
|
1111
|
+
|
|
1112
|
+
for exc_break, is_user_uncaught in check_excs:
|
|
1113
|
+
# Initially mark that it should stop and then go into exclusions.
|
|
1114
|
+
should_stop = True
|
|
1115
|
+
|
|
1116
|
+
if py_db.exclude_exception_by_filter(exc_break, trace):
|
|
1117
|
+
pydev_log.debug(
|
|
1118
|
+
"Ignore exception %s in library %s -- (%s)" % (exception, frame.f_code.co_filename, frame.f_code.co_name)
|
|
1119
|
+
)
|
|
1120
|
+
should_stop = False
|
|
1121
|
+
|
|
1122
|
+
elif exc_break.condition is not None and not py_db.handle_breakpoint_condition(info, exc_break, frame):
|
|
1123
|
+
should_stop = False
|
|
1124
|
+
|
|
1125
|
+
elif is_user_uncaught:
|
|
1126
|
+
# Note: we don't stop here, we just collect the exc_info to use later on...
|
|
1127
|
+
should_stop = False
|
|
1128
|
+
if not py_db.apply_files_filter(frame, frame.f_code.co_filename, True) and (
|
|
1129
|
+
frame.f_back is None or py_db.apply_files_filter(frame.f_back, frame.f_back.f_code.co_filename, True)
|
|
1130
|
+
):
|
|
1131
|
+
# User uncaught means that we're currently in user code but the code
|
|
1132
|
+
# up the stack is library code.
|
|
1133
|
+
exc_info = prev_user_uncaught_exc_info
|
|
1134
|
+
if not exc_info:
|
|
1135
|
+
exc_info = (arg, frame.f_lineno, set([frame.f_lineno]))
|
|
1136
|
+
else:
|
|
1137
|
+
lines = exc_info[2]
|
|
1138
|
+
lines.add(frame.f_lineno)
|
|
1139
|
+
exc_info = (arg, frame.f_lineno, lines)
|
|
1140
|
+
maybe_user_uncaught_exc_info = exc_info
|
|
1141
|
+
else:
|
|
1142
|
+
# I.e.: these are only checked if we're not dealing with user uncaught exceptions.
|
|
1143
|
+
if (
|
|
1144
|
+
exc_break.notify_on_first_raise_only
|
|
1145
|
+
and py_db.skip_on_exceptions_thrown_in_same_context
|
|
1146
|
+
and not was_just_raised
|
|
1147
|
+
and not just_raised(trace.tb_next)
|
|
1148
|
+
):
|
|
1149
|
+
# In this case we never stop if it was just raised, so, to know if it was the first we
|
|
1150
|
+
# need to check if we're in the 2nd method.
|
|
1151
|
+
should_stop = False # I.e.: we stop only when we're at the caller of a method that throws an exception
|
|
1152
|
+
|
|
1153
|
+
elif (
|
|
1154
|
+
exc_break.notify_on_first_raise_only
|
|
1155
|
+
and not py_db.skip_on_exceptions_thrown_in_same_context
|
|
1156
|
+
and not was_just_raised
|
|
1157
|
+
):
|
|
1158
|
+
should_stop = False # I.e.: we stop only when it was just raised
|
|
1159
|
+
|
|
1160
|
+
elif was_just_raised and py_db.skip_on_exceptions_thrown_in_same_context:
|
|
1161
|
+
# Option: Don't break if an exception is caught in the same function from which it is thrown
|
|
1162
|
+
should_stop = False
|
|
1163
|
+
|
|
1164
|
+
if should_stop:
|
|
1165
|
+
exception_breakpoint = exc_break
|
|
1166
|
+
try:
|
|
1167
|
+
info.pydev_message = exc_break.qname
|
|
1168
|
+
except:
|
|
1169
|
+
info.pydev_message = exc_break.qname.encode("utf-8")
|
|
1170
|
+
break
|
|
1171
|
+
|
|
1172
|
+
if should_stop:
|
|
1173
|
+
# Always add exception to frame (must remove later after we proceed).
|
|
1174
|
+
add_exception_to_frame(frame, (exception, value, trace))
|
|
1175
|
+
|
|
1176
|
+
if exception_breakpoint is not None and exception_breakpoint.expression is not None:
|
|
1177
|
+
py_db.handle_breakpoint_expression(exception_breakpoint, info, frame)
|
|
1178
|
+
|
|
1179
|
+
return should_stop, frame, maybe_user_uncaught_exc_info
|
|
1180
|
+
|
|
1181
|
+
|
|
1182
|
+
# Same thing in the main debugger but only considering the file contents, while the one in the main debugger
|
|
1183
|
+
# considers the user input (so, the actual result must be a join of both).
|
|
1184
|
+
filename_to_lines_where_exceptions_are_ignored: dict = {}
|
|
1185
|
+
filename_to_stat_info: dict = {}
|
|
1186
|
+
|
|
1187
|
+
|
|
1188
|
+
# IFDEF CYTHON
|
|
1189
|
+
# def handle_exception(py_db, thread, frame, arg, str exception_type):
|
|
1190
|
+
# cdef bint stopped;
|
|
1191
|
+
# cdef tuple abs_real_path_and_base;
|
|
1192
|
+
# cdef str absolute_filename;
|
|
1193
|
+
# cdef str canonical_normalized_filename;
|
|
1194
|
+
# cdef dict lines_ignored;
|
|
1195
|
+
# cdef dict frame_id_to_frame;
|
|
1196
|
+
# cdef dict merged;
|
|
1197
|
+
# cdef object trace_obj;
|
|
1198
|
+
# ELSE
|
|
1199
|
+
def handle_exception(py_db, thread, frame, arg, exception_type):
|
|
1200
|
+
# ENDIF
|
|
1201
|
+
stopped = False
|
|
1202
|
+
try:
|
|
1203
|
+
# print('handle_exception', frame.f_lineno, frame.f_code.co_name)
|
|
1204
|
+
|
|
1205
|
+
# We have 3 things in arg: exception type, description, traceback object
|
|
1206
|
+
trace_obj = arg[2]
|
|
1207
|
+
|
|
1208
|
+
initial_trace_obj = trace_obj
|
|
1209
|
+
if trace_obj.tb_next is None and trace_obj.tb_frame is frame:
|
|
1210
|
+
# 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).
|
|
1211
|
+
pass
|
|
1212
|
+
else:
|
|
1213
|
+
# Get the trace_obj from where the exception was raised...
|
|
1214
|
+
while trace_obj.tb_next is not None:
|
|
1215
|
+
trace_obj = trace_obj.tb_next
|
|
1216
|
+
|
|
1217
|
+
if py_db.ignore_exceptions_thrown_in_lines_with_ignore_exception:
|
|
1218
|
+
for check_trace_obj in (initial_trace_obj, trace_obj):
|
|
1219
|
+
abs_real_path_and_base = get_abs_path_real_path_and_base_from_frame(check_trace_obj.tb_frame)
|
|
1220
|
+
absolute_filename = abs_real_path_and_base[0]
|
|
1221
|
+
canonical_normalized_filename = abs_real_path_and_base[1]
|
|
1222
|
+
|
|
1223
|
+
lines_ignored = filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename)
|
|
1224
|
+
if lines_ignored is None:
|
|
1225
|
+
lines_ignored = filename_to_lines_where_exceptions_are_ignored[canonical_normalized_filename] = {}
|
|
1226
|
+
|
|
1227
|
+
try:
|
|
1228
|
+
curr_stat = os.stat(absolute_filename)
|
|
1229
|
+
curr_stat = (curr_stat.st_size, curr_stat.st_mtime)
|
|
1230
|
+
except:
|
|
1231
|
+
curr_stat = None
|
|
1232
|
+
|
|
1233
|
+
last_stat = filename_to_stat_info.get(absolute_filename)
|
|
1234
|
+
if last_stat != curr_stat:
|
|
1235
|
+
filename_to_stat_info[absolute_filename] = curr_stat
|
|
1236
|
+
lines_ignored.clear()
|
|
1237
|
+
try:
|
|
1238
|
+
linecache.checkcache(absolute_filename)
|
|
1239
|
+
except:
|
|
1240
|
+
pydev_log.exception("Error in linecache.checkcache(%r)", absolute_filename)
|
|
1241
|
+
|
|
1242
|
+
from_user_input = py_db.filename_to_lines_where_exceptions_are_ignored.get(canonical_normalized_filename)
|
|
1243
|
+
if from_user_input:
|
|
1244
|
+
merged = {}
|
|
1245
|
+
merged.update(lines_ignored)
|
|
1246
|
+
# Override what we have with the related entries that the user entered
|
|
1247
|
+
merged.update(from_user_input)
|
|
1248
|
+
else:
|
|
1249
|
+
merged = lines_ignored
|
|
1250
|
+
|
|
1251
|
+
exc_lineno = check_trace_obj.tb_lineno
|
|
1252
|
+
|
|
1253
|
+
# print ('lines ignored', lines_ignored)
|
|
1254
|
+
# print ('user input', from_user_input)
|
|
1255
|
+
# print ('merged', merged, 'curr', exc_lineno)
|
|
1256
|
+
|
|
1257
|
+
if exc_lineno not in merged: # Note: check on merged but update lines_ignored.
|
|
1258
|
+
try:
|
|
1259
|
+
line = linecache.getline(absolute_filename, exc_lineno, check_trace_obj.tb_frame.f_globals)
|
|
1260
|
+
except:
|
|
1261
|
+
pydev_log.exception("Error in linecache.getline(%r, %s, f_globals)", absolute_filename, exc_lineno)
|
|
1262
|
+
line = ""
|
|
1263
|
+
|
|
1264
|
+
if IGNORE_EXCEPTION_TAG.match(line) is not None:
|
|
1265
|
+
lines_ignored[exc_lineno] = 1
|
|
1266
|
+
return False
|
|
1267
|
+
else:
|
|
1268
|
+
# Put in the cache saying not to ignore
|
|
1269
|
+
lines_ignored[exc_lineno] = 0
|
|
1270
|
+
else:
|
|
1271
|
+
# Ok, dict has it already cached, so, let's check it...
|
|
1272
|
+
if merged.get(exc_lineno, 0):
|
|
1273
|
+
return False
|
|
1274
|
+
|
|
1275
|
+
try:
|
|
1276
|
+
frame_id_to_frame = {}
|
|
1277
|
+
frame_id_to_frame[id(frame)] = frame
|
|
1278
|
+
f = trace_obj.tb_frame
|
|
1279
|
+
while f is not None:
|
|
1280
|
+
frame_id_to_frame[id(f)] = f
|
|
1281
|
+
f = f.f_back
|
|
1282
|
+
f = None
|
|
1283
|
+
|
|
1284
|
+
stopped = True
|
|
1285
|
+
py_db.send_caught_exception_stack(thread, arg, id(frame))
|
|
1286
|
+
try:
|
|
1287
|
+
py_db.set_suspend(thread, CMD_STEP_CAUGHT_EXCEPTION)
|
|
1288
|
+
py_db.do_wait_suspend(thread, frame, "exception", arg, exception_type=exception_type)
|
|
1289
|
+
finally:
|
|
1290
|
+
py_db.send_caught_exception_stack_proceeded(thread)
|
|
1291
|
+
except:
|
|
1292
|
+
pydev_log.exception()
|
|
1293
|
+
|
|
1294
|
+
py_db.set_trace_for_frame_and_parents(thread.ident, frame)
|
|
1295
|
+
finally:
|
|
1296
|
+
# Make sure the user cannot see the '__exception__' we added after we leave the suspend state.
|
|
1297
|
+
remove_exception_from_frame(frame)
|
|
1298
|
+
# Clear some local variables...
|
|
1299
|
+
frame = None
|
|
1300
|
+
trace_obj = None
|
|
1301
|
+
initial_trace_obj = None
|
|
1302
|
+
check_trace_obj = None
|
|
1303
|
+
f = None
|
|
1304
|
+
frame_id_to_frame = None
|
|
1305
|
+
py_db = None
|
|
1306
|
+
thread = None
|
|
1307
|
+
|
|
1308
|
+
return stopped
|