mirror of
https://github.com/wassname/ray.git
synced 2026-08-20 12:40:44 +08:00
[doc] Add documentation for Ray debugger (#11815)
Co-authored-by: Richard Liaw <rliaw@berkeley.edu>
This commit is contained in:
co-authored by
Richard Liaw
parent
27c810a97e
commit
28e7439cf0
@@ -170,12 +170,16 @@ def connect_ray_pdb(host=None, port=None, patch_stdstreams=False, quiet=None):
|
||||
return rdb
|
||||
|
||||
|
||||
def set_trace(host=None, port=None, patch_stdstreams=False, quiet=None):
|
||||
def set_trace():
|
||||
"""Interrupt the flow of the program and drop into the Ray debugger.
|
||||
|
||||
Can be used within a Ray task or actor.
|
||||
"""
|
||||
frame = sys._getframe().f_back
|
||||
rdb = connect_ray_pdb(host, port, patch_stdstreams, quiet)
|
||||
rdb = connect_ray_pdb(None, None, False, None)
|
||||
rdb.set_trace(frame=frame)
|
||||
|
||||
|
||||
def post_mortem(host=None, port=None, patch_stdstreams=False, quiet=None):
|
||||
rdb = connect_ray_pdb(host, port, patch_stdstreams, quiet)
|
||||
def post_mortem():
|
||||
rdb = connect_ray_pdb(None, None, False, None)
|
||||
rdb.post_mortem()
|
||||
|
||||
Reference in New Issue
Block a user