Skip to content

threadId inconsistency in continued events #819

@JohanMabille

Description

@JohanMabille

Environment data

  • debugpy version: 1.5.1
  • OS and version: gentoo 5.4
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.9.7, miniconda
  • Using VS Code or Visual Studio: Jupyter Lab + ipykernel

ipykernel is a python process with many threads. One of them is dedicated to execute the code sent by the frontend (JupyterLab), another one is dedicated to communicate with debugpy through a TCP socket.

Actual behavior

When I hit a breakpoint, if I send a continue request, the threadId value contained in the fired continued event is correct (threadId1, which is that of the main thread). However, if I send a next request, the threadId value contained in the fired continued event is wrong (threadId5).

Expected behavior

The threadId value of a continued event should be the same and independent from the request that leads to fire a continue event.

Steps to reproduce:

Launch jupyterlab, open a python notebook and start the debugger. Set a breakpoint in a cell, execute the code. When the code execute the cell, click on the "next" button in the debugger panel (then continue to resume).

Execute the code again, but this time click on continue after the code hit the breakpoint.

In the logs of debugPy, you can notice that the threadId values of the different continued events are different .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions