Ray Debug Tutorial

Author: Ao Shen.

How to debug?

Legacy Ray Debugger

  1. Ray has a builtin legacy debugger that allows you to debug your distributed applications. To enable debugger, start ray cluster with RAY_DEBUG=legacy and --ray-debugger-external.

# start head node
RAY_DEBUG=legacy ray start --head --dashboard-host=0.0.0.0 --ray-debugger-external
# start worker node
RAY_DEBUG=legacy ray start --address='10.124.46.192:6379' --ray-debugger-external
  1. Set up breakpoint in your code, and submit job to cluster. Then run ray debug to wait breakpoint:

https://github.com/eric-haibin-lin/verl-community/blob/main/docs/ray/legacy.png?raw=true