Skip to content

Re-attaching continuously creates 'accept_worker' threads in debugpy #1008

@rchiodo

Description

@rchiodo

Before creating a new issue, please check the FAQ to see if your question is answered there.

Environment data

  • debugpy version: 1.62
  • OS and version: Windows 10
  • Python version (& distribution if applicable, e.g. Anaconda): 3.10
  • Using VS Code or Visual Studio: VS code

Steps to reproduce:

  1. Set the new 'DEBUGPY_TRACE_DEBUGPY' flag. This allows the debugger to see debugpy threads.
  2. Start VS code (so that it uses this environment variable) and open a notebook
  3. Debug a cell
  4. Finish debugging the cell (if it hasn't already)
  5. Start another VS code to debug the first
  6. Attach to the adapter process
  7. Check the list of threads. It should show something like so:

image

  1. Debug the same cell again
  2. Check list of threads in other VS code

image

  1. Repeat

image

The 'accept_worker' thread list keeps growing.

Not sure if this is problem in the debug commands sent from VS code (maybe it never actually detaches?) or if debugpy is not cleaning things up on disconnect.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions