# VScode breakpoint will be bypassed even with local\_mode=True

**URL:** <https://discuss.ray.io/t/vscode-breakpoint-will-be-bypassed-even-with-local-mode-true/8493>\
**Category:** Ray Train\
**Created:** [November 30, 2022, 10:43pm UTC](https://discuss.ray.io/t/vscode-breakpoint-will-be-bypassed-even-with-local-mode-true/8493 "2022-11-30T22:43:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![heng2j](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/heng2j/32/1342_2.png) [@heng2j](https://discuss.ray.io/u/heng2j)\
**Post date:** [November 30, 2022, 10:43pm UTC](https://discuss.ray.io/t/vscode-breakpoint-will-be-bypassed-even-with-local-mode-true/8493/1 "2022-11-30T22:43:46Z")

</div>

**How severe does this issue affect your experience of using Ray?**

- Medium: It contributes to significant difficulty to complete my task, but I can work around it.

I am writing a DL training framework that leverages Ray Train and Ray Tune. Unlike my previous experience with RLLib, VScode breakpoints that I set in Ray Train processes would be passed despite I set `local_mode=True` in Ray 2.1.0. Which forced me to use Ray Debug, which is not convenient for Test Driven Development.

Is this an expected behavior for Ray Train, or is it a bug? Or is there anything I missed?

---

<div class="post-metadata">

**Author:** ![heng2j](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/heng2j/32/1342_2.png) [@heng2j](https://discuss.ray.io/u/heng2j)\
**Post date:** [December 6, 2022, 4:51pm UTC](https://discuss.ray.io/t/vscode-breakpoint-will-be-bypassed-even-with-local-mode-true/8493/2 "2022-12-06T16:51:29Z")

</div>

Hi Team, is this a known issue? Or we have plan to allow synchronized debugging in Ray Train?

---

<div class="post-metadata">

**Author:** ![rliaw](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/rliaw/32/24_2.png) [@rliaw](https://discuss.ray.io/u/rliaw)\
**Post date:** [December 14, 2022, 7:37am UTC](https://discuss.ray.io/t/vscode-breakpoint-will-be-bypassed-even-with-local-mode-true/8493/3 "2022-12-14T07:37:14Z")

</div>

Hey @heng2j, sorry for the late response. Local\_mode has been hard to maintain and I suspect it won’t work quite well with Ray Train.

A couple options for you include:

1. Setting num\_workers=0 or num\_workers=1.
2. Using Ray Debug.

I’d be curious about your experience with Ray Debug. What makes it inconvenient?

---

<div class="post-metadata">

**Author:** ![robcaulk](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/robcaulk/32/4455_2.png) [@robcaulk](https://discuss.ray.io/u/robcaulk)\
**Post date:** [May 18, 2023, 3:19pm UTC](https://discuss.ray.io/t/vscode-breakpoint-will-be-bypassed-even-with-local-mode-true/8493/4 "2023-05-18T15:19:14Z")

</div>

I am searching for a way to use the vscode debugger with Ray. I have used the ray debug mode, and while it works and is effective for quick checks, it lacks all modern QOL which reduces development speed by orders of magnitude:

- Fast breakpoint deactivation/activation
- Adding breakpoints during a live run
- Interactive gui scope for quick variable interrogation
- ability to copy paste multi line functions or loops without indentation considerations
- simple things like being able to use the up arrow to re-execute and modify previous commands

Any chance vscode debugging will eventually be supported in Ray?

Cheers,

Robert

---

<div class="post-metadata">

**Author:** ![heng2j](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/heng2j/32/1342_2.png) [@heng2j](https://discuss.ray.io/u/heng2j)\
**Post date:** [October 6, 2023, 2:33pm UTC](https://discuss.ray.io/t/vscode-breakpoint-will-be-bypassed-even-with-local-mode-true/8493/5 "2023-10-06T14:33:39Z")

</div>

Hi @rliaw, thank you for getting back to me.

For my recent projects, I only use `Ray Train` when needed due to 1) personal preference of the VSCode debugger workflow. 2) The scope of the RLLib project allows me to debug with your suggested `num_workers=1` and using local\_mode. Especially when I can set `"justMyCode": false` in my VScode launch script

---

<div class="post-metadata">

**Author:** ![alikleit](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/alikleit/32/5206_2.png) [@alikleit](https://discuss.ray.io/u/alikleit)\
**Post date:** [November 16, 2023, 4:40pm UTC](https://discuss.ray.io/t/vscode-breakpoint-will-be-bypassed-even-with-local-mode-true/8493/6 "2023-11-16T16:40:38Z")

</div>

@rliaw is it possible to attach Ray Debugger to vscode’s remote debugging? thus inspecting the variables and stepping through the code visually in vs code not the terminal.

---

<div class="post-metadata">

**Author:** ![Zac](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/zac/32/3822_2.png) [@Zac](https://discuss.ray.io/u/Zac)\
**Post date:** [January 3, 2024, 6:01pm UTC](https://discuss.ray.io/t/vscode-breakpoint-will-be-bypassed-even-with-local-mode-true/8493/7 "2024-01-03T18:01:39Z")

</div>

We would also greatly appreciate this feature.  
Even just being able to use the up-arrow to retrieve the last run command would be a big improvement (this is a standard pdb/terminal feature). Currently, pressing the up-arrow in a `ray debug` session does not retrieve the previously run command.

---

<div class="post-metadata">

**Author:** ![BitCalSaul](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/bitcalsaul/32/8468_2.png) [@BitCalSaul](https://discuss.ray.io/u/BitCalSaul)\
**Post date:** [February 13, 2026, 5:47pm UTC](https://discuss.ray.io/t/vscode-breakpoint-will-be-bypassed-even-with-local-mode-true/8493/8 "2026-02-13T17:47:02Z")

</div>

Hi @robcaulk did you find a walkaround to add live breakpoint?
