Tags: microsoft/debugpy
Tags
Add python 3.15 to tests (#2069) * add 3.15rc1 to pipelines, update 3.14rc2->3.14 * add 3.15 to classifiers list in setup.py * Add 315 to tox.ini * add minor number to 3.15rc1 version number * add 3.15 support to py_version.hpp * Test nested exception handling during unhandled exception reporting Verify that an exception already reported as unhandled remains recognized after a nested exception replaces the transient exception state. This prevents the original exception from being reported twice. * Preserve reported unhandled exceptions across nested exceptions Track the identity of an exception once it has been reported as unhandled so that nested exceptions cannot cause it to be reported again. Clear the transient exception state before stopping while retaining the reported exception tag for the remainder of its unwind. This fixes duplicate SystemExit stops exposed by Python 3.15, where traceback formatting can trigger a nested monitored exception while resolving its lazy _colorize import. * Regenerate sys.monitoring Cython sources Regenerate the .pyx and .c files from the modified _pydevd_sys_monitoring.py implementation. * Ignore multithreaded fork warning in multiprocessing tests Python 3.15 propagates the multithreaded os.fork() DeprecationWarning as an exception when warnings are configured as errors. Debuggee test sessions set PYTHONWARNINGS=error, and debugpy's worker threads cause CPython to emit this warning during the multiprocessing fork tests. The child process has already been created when the warning is raised in the parent. This terminates the parent while the child is attaching, resulting in premature terminated events or test timeouts. Ignore only this specific warning when the test intentionally uses the fork start method. Other warnings remain errors, and spawn-based tests are unaffected.
Fix TSA #2816217: suppress Flawfinder false positive on Cython JoinPy… …Unicode memcpy (#2029) * Fix TSA #2816217: suppress Flawfinder false positive on Cython JoinPyUnicode memcpy Flawfinder's buffer/memcpy rule (CWE-120) fires on any memcpy() call by default. The flagged call sits inside the Cython 3.x string-join helper __Pyx_PyUnicode_Join: memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift)); It is provably safe: * result_uval was just allocated via PyUnicode_New(result_ulength, max_char) and result_udata = PyUnicode_DATA(result_uval) points into that buffer. * The immediately preceding check (PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos guards against char_pos+ulength overflow before the memcpy executes. * result_ulength is computed by the caller as the sum of input lengths, so char_pos + ulength <= result_ulength after each iteration. The byte count `ulength << kind_shift` is bounded by the allocated buffer. Add an inline /* Flawfinder: ignore */ annotation on the flagged line in the Cython-generated _pydevd_sys_monitoring_cython.c and extend the existing post-processing block in setup_pydevd_cython.py so the annotation is re-applied automatically whenever Cython regenerates the .c files. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix SyntaxError: add missing closing paren on JoinPyUnicode .replace() call The merge from main inadvertently dropped the closing ')' of the new JoinPyUnicode '.replace(...)' call, so the subsequent 'read<end' '.replace(...)' block was being parsed as continued arguments. Add the missing ')' (and a blank line) to separate the two calls cleanly. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fix arq quoting to work in runInTerminal (#1981) * Fix arq quoting to work in runInTerminal * Default was backwards * Fix ruff errors * Fix failing tests * Only strip quotes on the exe * Try fixing gw worker failures * Skip certain test because of cmd limitations * Need to skip all 'code' based tests on windows
pydevd: Fix up prefix of attach shared library for Windows (#1939) Follow-up to #1917, which changed the prefix for Windows. The crux of that contribution was about enabling attaching on Sillicon Mac (in fact, it came from my colleagues at Zed Industries). This however broke .dll lookup per zed-industries/zed#35640 (comment)
Fix debugger stepping actions in forked process (#1921) * Fix debugger stepping actions in forked process Fix the debugger stepping state when debugging a process that has been forked from the main process. The new sys.monitoring mechanism didn't fully clear the thread local storage after a fork leading to a state where the forked child process tracked the wrong thread information and was never updated on the latest continue action. * Add stepping test for forked process * Add line ending back in for cleaner diff * More formatting reversions
PreviousNext