Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: microsoft/debugpy
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7ac3d1f
Choose a base ref
...
head repository: microsoft/debugpy
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 858b05c
Choose a head ref
  • 17 commits
  • 114 files changed
  • 10 contributors

Commits on Feb 23, 2026

  1. Replace removed pkgutil.get_loader with importlib.util.find_spec in g…

    …et_fullname (#1998)
    
    * Initial plan
    
    * Fix get_fullname to use importlib.util.find_spec instead of removed pkgutil.get_loader
    
    pkgutil.get_loader() was removed in Python 3.14, causing subprocess
    module execution to fail with "No module named" when subProcess: true.
    Replace with importlib.util.find_spec() which is the recommended
    replacement and works across all supported Python versions.
    
    Co-authored-by: rchiodo <19672699+rchiodo@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    Co-authored-by: rchiodo <19672699+rchiodo@users.noreply.github.com>
    Copilot and rchiodo authored Feb 23, 2026
    Configuration menu
    Copy the full SHA
    bc6fe51 View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2026

  1. Configuration menu
    Copy the full SHA
    2801e48 View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2026

  1. Show error message on evaluate also for hover context (#2006)

    If a client sends an evaluate command with context=hover and if the
    expression fails, the client received an error with the message
    "Exception occurred during evaluation"
    
    This wasn't very helpful. This changes the logic to treat `hover` just
    like `watch` in the error case to send back `eval_result.result`. That
    contains the message of the exception which is typically more useful.
    mfussenegger authored Mar 9, 2026
    Configuration menu
    Copy the full SHA
    880b083 View commit details
    Browse the repository at this point in the history
  2. avoid strong reference to exceptions during unwind (#2008)

    * avoid strong reference to exceptions during unwind
    
    * update cython files
    
    * fix getattr
    
    * remove comment
    
    * avoid side effect from overloaded getattr/setattr
    
    * Generate cython on Windows
    
    * Put back non sys monitoring cython
    
    ---------
    
    Co-authored-by: Rich Chiodo false <rchiodo@microsoft.com>
    maxbachmann and rchiodo authored Mar 9, 2026
    Configuration menu
    Copy the full SHA
    bd4e1a6 View commit details
    Browse the repository at this point in the history
  3. Pull changes from pydevd up to March 2026 (#2010)

    * git subrepo commit (merge) src/debugpy/_vendored/pydevd
    
    subrepo:
      subdir:   "src/debugpy/_vendored/pydevd"
      merged:   "6bacec5b"
    upstream:
      origin:   "https://github.com/fabioz/PyDev.Debugger.git"
      branch:   "main"
      commit:   "b5cfeb38"
    git-subrepo:
      version:  "0.4.1"
      origin:   "???"
      commit:   "???"
    
    * Fixup generator to not add files in the venv
    
    * Update contributing.md
    rchiodo authored Mar 9, 2026
    Configuration menu
    Copy the full SHA
    b7f2433 View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2026

  1. Fix: ContinueRequest with specific threadId resumes all threads (in-p…

    …rocess adapter fix) (#2012)
    
    * Initial plan
    
    * Fix multi-thread resume when in-process debug adapter is used
    
    Per the DAP spec, a ContinueRequest should resume all threads unless
    singleThread=True is explicitly set. Previously, only the out-of-process
    adapter path worked correctly (it transformed threadId to '*' before
    forwarding to pydevd). With the in-process adapter, the specific threadId
    reached pydevd directly but was only used to resume that one thread.
    
    Fix on_continue_request to set thread_id='*' whenever singleThread is not
    True, regardless of multi_threads_single_notification. Also update
    write_continue test helper and add a regression test.
    
    Fixes: #2009
    
    Co-authored-by: rchiodo <19672699+rchiodo@users.noreply.github.com>
    
    * Use getattr for safe singleThread attribute access in on_continue_request
    
    Most DAP clients omit the optional singleThread field entirely. Using
    getattr(arguments, 'singleThread', False) is more defensive than direct
    attribute access, guarding against any non-standard arguments objects.
    
    Co-authored-by: rchiodo <19672699+rchiodo@users.noreply.github.com>
    
    * Add timeout failure comment in test; keep intentional TEST SUCEEDED convention
    
    The 'TEST SUCEEDED' misspelling is an intentional convention in the pydevd
    test framework (debugger_unittest.py checks stdout for this exact string).
    Revert the resource file to preserve the convention while still adding the
    explanatory comment requested in the test method.
    
    Co-authored-by: rchiodo <19672699+rchiodo@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    Co-authored-by: rchiodo <19672699+rchiodo@users.noreply.github.com>
    Copilot and rchiodo authored Mar 13, 2026
    Configuration menu
    Copy the full SHA
    fb467d8 View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2026

  1. Add option for ignore all system exit codes (#2017)

    * Add option for ignore all system exit codes
    
    * Change to Pavel's suggestion
    
    * More checking
    
    * Fix whitespace
    
    * Add test for range scenario
    
    * Review feedback
    rchiodo authored Apr 3, 2026
    Configuration menu
    Copy the full SHA
    6d265e0 View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2026

  1. Fix evaluation of variables from chained exception frames (#2018)

    * Fix evaluation of variables from chained exception frames
    
    * Move frame registration into a shared helper function
    pdepetro authored Apr 10, 2026
    Configuration menu
    Copy the full SHA
    0f037ad View commit details
    Browse the repository at this point in the history

Commits on May 4, 2026

  1. Potential fix when -c arguments are bytes instead of a str (#2021)

    * Create test for issue
    
    * Trying out a fix
    
    * Fix syntax errors
    
    * Really fix syntax errors
    rchiodo authored May 4, 2026
    Configuration menu
    Copy the full SHA
    a55be0e View commit details
    Browse the repository at this point in the history

Commits on May 12, 2026

  1. Configuration menu
    Copy the full SHA
    bf118c8 View commit details
    Browse the repository at this point in the history

Commits on May 14, 2026

  1. Prevent invalid scopes request from crashing debug session (#2026)

    * Prevent invalid scopes request from crashing debug session
    
    If an unmapped or non-numeric frameId is sent in a scopes request,
    int() raises a ValueError that terminates the debug session. Wrap the
    scope construction in a try/except so that invalid frameIds return an
    empty scopes list instead, which is valid per the DAP spec.
    
    * Add logging for invalid scopes requests
    
    Log expected errors (ValueError, TypeError) at info level and
    unexpected exceptions with full traceback via pydev_log.exception.
    pdepetro authored May 14, 2026
    Configuration menu
    Copy the full SHA
    8bd57a7 View commit details
    Browse the repository at this point in the history

Commits on May 27, 2026

  1. Return evaluate result in DAP response body instead of writing to std…

    …out (#2027)
    
    When a DAP client sends an `evaluate` request with `context: "repl"` and no
    `frameId`, debugpy forces the expression through the exec code path. Previously,
    if the expression could be compiled as an eval (e.g. `2 + 2`),
    `evaluate_expression` would compute the result but write it to `sys.stdout` and
    return `None`. The caller in `internal_evaluate_expression_json` would then send
    back `result=""` in the response body. Clients that read the response
    body would get nothing, while the actual value was emitted as a DAP output event.
    
    This changes `evaluate_expression` to return the computed result from the
    eval-within-exec path instead of printing it. The caller now captures that
    return value and includes it in the response body. Pure exec statements (e.g.
    `x = 42`) continue to return `None` and produce `result=""` as before.
    
    VS Code is unaffected because it always provides a `frameId`, which routes
    through the normal eval path where results already go into the response body.
    pdepetro authored May 27, 2026
    Configuration menu
    Copy the full SHA
    12bd4fe View commit details
    Browse the repository at this point in the history

Commits on May 28, 2026

  1. Merge pull request #2031 from StellaHuang95/stellahuang/tsa-2816219-f…

    …lawfinder-cython-read-loop
    
    Fix TSA #2816219: suppress Flawfinder false positive on Cython read-loop iterator (_pydevd_sys_monitoring_cython.c)
    StellaHuang95 authored May 28, 2026
    Configuration menu
    Copy the full SHA
    ab92638 View commit details
    Browse the repository at this point in the history
  2. Fix TSA #2816220: suppress Flawfinder false positive on Cython read-l…

    …oop iterator (#2032)
    
    Flawfinder's buffer/read rule (CWE-120, CWE-20) fires whenever an
    identifier named "read" appears inside a loop, assuming it refers to the
    POSIX read() syscall. The Cython 3.x ModuleStateLookup boilerplate in
    __Pyx_State_ConvertFromInterpIdAsIndex uses "read" as the name of a
    pointer iterator that walks data->table, bounded by
    end = read + data->count. There is no syscall and no unbounded buffer
    access -- this is a false positive.
    
    Add an inline /* Flawfinder: ignore */ annotation to the flagged line in
    the Cython-generated pydevd_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>
    StellaHuang95 and Copilot authored May 28, 2026
    Configuration menu
    Copy the full SHA
    19c2b8c View commit details
    Browse the repository at this point in the history
  3. Fix TSA #2816218: suppress Flawfinder false positive on Cython read-l…

    …oop iterator (#2030)
    
    Flawfinder's buffer/read rule (CWE-120, CWE-20) fires whenever an
    identifier named "read" appears inside a loop, assuming it refers to the
    POSIX read() syscall. The Cython 3.x ModuleStateLookup boilerplate in
    __Pyx_State_ConvertFromInterpIdAsIndex uses "read" as the name of a
    pointer iterator that walks data->table, bounded by
    end = read + data->count. There is no syscall and no unbounded buffer
    access -- this is a false positive.
    
    Add an inline /* Flawfinder: ignore */ annotation to the flagged line in
    the Cython-generated pydevd_frame_evaluator.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>
    StellaHuang95 and Copilot authored May 28, 2026
    Configuration menu
    Copy the full SHA
    4c70e13 View commit details
    Browse the repository at this point in the history

Commits on May 29, 2026

  1. Fix TSA #2816216: suppress Flawfinder false positive on Cython DIGIT_…

    …PAIRS_8 memcpy (#2028)
    
    * Fix TSA #2816216: suppress Flawfinder false positive on Cython DIGIT_PAIRS_8 memcpy
    
    Flawfinder's buffer/memcpy rule (CWE-120) fires on any memcpy() call by
    default. The flagged call sits inside the Cython 3.x integer formatter
    __Pyx____Pyx_PyUnicode_From_int (case 'o'):
    
        memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
    
    It is provably safe:
    * dpos points into the stack buffer `digits[sizeof(int)*3+2]` (14 bytes
      for a 32-bit int); `dpos -= 2` immediately precedes the copy and the
      enclosing do/while loop iterates at most ceil(log_64(max_int)) times,
      so dpos always stays >= digits.
    * DIGIT_PAIRS_8 is a 128-byte compile-time constant table containing the
      64 two-character octal digit pairs "00".."77". `digit_pos = abs(remaining
      % 64)`, so `digit_pos * 2` ranges over [0, 126] and reads 2 bytes from
      offset [0, 127] -- within the table.
    * The size argument is the compile-time constant 2.
    
    Add an inline /* Flawfinder: ignore */ annotation on the flagged line in
    the Cython-generated pydevd_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 DIGIT_PAIRS_8 .replace() call
    
    Same merge-from-main artifact as #2029: the closing ')' of the new
    
    DIGIT_PAIRS_8 '.replace(...)' call was dropped when the 'read<end'
    
    '.replace(...)' block was spliced in, leaving the second call's args
    
    being parsed as continued positional args to the first.
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    StellaHuang95 and Copilot authored May 29, 2026
    Configuration menu
    Copy the full SHA
    f0c34f1 View commit details
    Browse the repository at this point in the history
  2. 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>
    StellaHuang95 and Copilot authored May 29, 2026
    Configuration menu
    Copy the full SHA
    858b05c View commit details
    Browse the repository at this point in the history
Loading