Skip to content

Support debugger #67

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

Open
apoorvkh opened this issue Sep 29, 2024 · 2 comments
Open

Support debugger #67

apoorvkh opened this issue Sep 29, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@apoorvkh
Copy link
Owner

No description provided.

@apoorvkh apoorvkh added the enhancement New feature or request label Oct 19, 2024
@apoorvkh
Copy link
Owner Author

apoorvkh commented Nov 3, 2024

@apoorvkh
Copy link
Owner Author

https://code.visualstudio.com/docs/python/debugging#_remote-script-debugging-with-ssh

Basically the way this would work:

  • Selected worker (which the debugger will connect to) will start the debugging server (and wait for the connection), right before executing worker_args.function(). All workers should also set a barrier().
import debugpy

local_ip: str
random_port: int

debugpy.listen((local_ip, random_port))
debugpy.wait_for_client()
  • Launcher should start a TCP tunnel (via SSH forwarding) to that port. Launcher should print the local mapped port.
  • User can attach Python debugger in vscode to that local port.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant