# Why can't I start multiple debugging sessions?

**URL:** <https://discuss.ray.io/t/why-cant-i-start-multiple-debugging-sessions/22161>\
**Category:** Dashboard, Monitoring & Debugging\
**Created:** [March 27, 2025, 9:40pm UTC](https://discuss.ray.io/t/why-cant-i-start-multiple-debugging-sessions/22161 "2025-03-27T21:40:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vadimcn](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/vadimcn/32/7817_2.png) [@vadimcn](https://discuss.ray.io/u/vadimcn)\
**Post date:** [March 27, 2025, 9:40pm UTC](https://discuss.ray.io/t/why-cant-i-start-multiple-debugging-sessions/22161/1 "2025-03-27T21:40:11Z")

</div>

It seems that the Distributed Debugger does not allow to have more than one active debug session?  
For example, if I am debugging the main script and then would like to attach to one of the worker processes, the attach button is grayed out:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/ray/original/2X/0/05ed9f06d54844c800eed89f8883470ff32c1394.png)

---

<div class="post-metadata">

**Author:** ![christina](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/christina/32/7542_2.png) [@christina](https://discuss.ray.io/u/christina)\
**Post date:** [April 1, 2025, 12:30am UTC](https://discuss.ray.io/t/why-cant-i-start-multiple-debugging-sessions/22161/2 "2025-04-01T00:30:57Z")

</div>

Hi there! Yes, it seems like for the most part, the Distributed Debugger doesn’t support more than 1 active debug session at a time.

Here are the docs: [Ray Distributed Debugger — Ray 2.44.1](https://docs.ray.io/en/latest/ray-observability/ray-distributed-debugger.html#start-and-stop-debugging)

> After you’re done debugging this particular breakpoint, click the **Disconnect** button in the debugging toolbar so you can join another task in the **Paused Tasks** list

You’ll have to pause your main script and then attach one of the workers if you would like to debug from the worker.

---

<div class="post-metadata">

**Author:** ![vadimcn](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/vadimcn/32/7817_2.png) [@vadimcn](https://discuss.ray.io/u/vadimcn)\
**Post date:** [April 1, 2025, 6:33pm UTC](https://discuss.ray.io/t/why-cant-i-start-multiple-debugging-sessions/22161/3 "2025-04-01T18:33:14Z")

</div>

Yes, that’s what it looks like, but why?  
VSCode Python debugger is perfectly capable if running multiple debug sessions. And I can’t see an obvious reason why DD couldn’t allow launching more than one. Especially, considering that in my scenario, the existing session is not even DD-related.

---

<div class="post-metadata">

**Author:** ![R\_W](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/r_w/32/8193_2.png) [@R\_W](https://discuss.ray.io/u/R_W)\
**Post date:** [September 2, 2025, 10:08am UTC](https://discuss.ray.io/t/why-cant-i-start-multiple-debugging-sessions/22161/4 "2025-09-02T10:08:57Z")

</div>

This feature is especially helpful when working with multiple workers (Ray tasks or actors). In the current design, if a debugging session is released, the worker continues to run without any way to reattach to it—unless another breakpoint is set later. Moreover, the current design does not show the call structure between workers, which makes it difficult to understand complex programs involving multiple workers.

---

<div class="post-metadata">

**Author:** ![Daraan](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/daraan/32/7391_2.png) [@Daraan](https://discuss.ray.io/u/Daraan)\
**Post date:** [September 3, 2025, 4:49pm UTC](https://discuss.ray.io/t/why-cant-i-start-multiple-debugging-sessions/22161/5 "2025-09-03T16:49:03Z")

</div>

It is not as simple as “just-a-click” but I think if you use the normal debugger interface you can add a configuration like below and attach to multiple runners:

```json
    "configurations": [
        {
            "name": "Python Debugger: Remote Attach (User Input Host:Port)",
            "type": "debugpy",
            "request": "attach",
            "connect": {
                "host": "${input:remoteHost}",
                "port": "${input:remotePort}"
            }
        }
        }

```
