Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Debugger] Ray debugger interrupts with my normal flow of debugging #48728

Open
kouroshHakha opened this issue Nov 13, 2024 · 3 comments
Open
Labels
bug Something that is supposed to be working; but isn't debugger triage Needs triage (eg: priority, bug/not-bug, and owning component)

Comments

@kouroshHakha
Copy link
Contributor

What happened + What you expected to happen

When i run the repro code on ray 2.39 I get the message 2024-11-13 12:11:46,137 INFO debugpy.py:92 -- Waiting for debugger to attach (see https://docs.ray.io/en/latest/ray-observability/ray-distributed-debugger.html)...

but in 2.38 this wasn't the case, and I could interactively debug.

Please note that I have put the breakpoint on the driver and not inside the tasks / actors, so I don't really need distributed debugging here.

Versions / Dependencies

ray==2.39 doesn't work
ray==2.38 works

Reproduction script

import ray


def main():
    ds = ray.data.from_items(
        [
            {
                "input": "David",
                "expected": "Hi David",
            },
        ]
    )
    breakpoint()
    
    

if __name__ == "__main__":
    main()

Issue Severity

High: It blocks me from completing my task.

@kouroshHakha kouroshHakha added bug Something that is supposed to be working; but isn't triage Needs triage (eg: priority, bug/not-bug, and owning component) labels Nov 13, 2024
@pcmoritz
Copy link
Contributor

Thanks for reporting, you can restore the previous behavior by setting RAY_DEBUG=legacy

@jcotant1 jcotant1 added core Issues that should be addressed in Ray Core debugger labels Nov 13, 2024
@pcmoritz
Copy link
Contributor

pcmoritz commented Nov 13, 2024

I could see people who run a driver in an interactive shell wanting to use PDB directly in it. We could detect that and invoke PDB by default (if stdin is connected, which will be the case e.g. if you run in a shell). I'm not a huge fan of the inconsistency but good UX triumphs consistency sometime, what do you think @kouroshHakha ?

@kouroshHakha
Copy link
Contributor Author

yeah I think that's a reasonable. And if there is a flag to control this behavior by selecting pdb vs. debugpy is a good compromise.

@jjyao jjyao removed the core Issues that should be addressed in Ray Core label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is supposed to be working; but isn't debugger triage Needs triage (eg: priority, bug/not-bug, and owning component)
Projects
None yet
Development

No branches or pull requests

4 participants