Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Remote debugging support #99

Open
virtuald opened this issue Dec 29, 2014 · 10 comments
Open

Remote debugging support #99

virtuald opened this issue Dec 29, 2014 · 10 comments
Labels
Milestone

Comments

@virtuald
Copy link
Member

Possibly leverage eclipse/pydev support for this? Depends on #26

@virtuald virtuald added this to the Someday milestone Dec 29, 2014
@virtuald
Copy link
Member Author

I was able to launch a remote debugger using a patched version of pydevd (fabioz/PyDev.Debugger#39). It works pretty nicely.

The way I envision this to work is the user will need to install pydevd on the roborio via the installer, and we'll include a special module that automatically sets up the PATHS_FROM_ECLIPSE_TO_PYTHON variables to map back to the users robot source directory for wpilib and the robot code itself.

@virtuald
Copy link
Member Author

I think the easiest way to go about this has two pieces:

@auscompgeek
Copy link
Member

I think this could be a good bug for a newcomer to work on if they wanted to delve into how RobotPy works under the hood.

@ThadHouse
Copy link

With upstream WPILib moving to VS Code for the 2019 season, it might be worth looking into how remote debug works there. There are some docs going about how to do this.
https://code.visualstudio.com/docs/python/debugging#_remote-debugging

@virtuald
Copy link
Member Author

That does look pretty straightforward, thanks for pointing it out 👍

@auscompgeek
Copy link
Member

Huh, that looks so much simpler than pydevd.

I imagine that there will be a number of teams who prefer to use PyCharm over Visual Studio/VSCode though, so we should definitely also consider supporting both ptvsd and pydevd in the long term.

Just to be painful though, PTVS requires different versions of ptvsd than vscode-python, so installing it by default will probably be a bad idea.

Dunno how many people actually use PTVS though. (I imagine that number would be fairly small, but shouldn't mean we should aim to be IDE-agnostic.)

@auscompgeek
Copy link
Member

Note: We'll probably want to distribute ptvsd/pydevd with the Cython extensions.

@virtuald
Copy link
Member Author

I think that makes sense. I'd be in favor of distributing a vscode-compatible install by default, but make other configurations possible. Not sure how that would work quite yet though.

@auscompgeek
Copy link
Member

Looks like the VS Code plugin supports newer versions of ptvsd nowadays, so we should be ok to package up the latest stable release.

@auscompgeek
Copy link
Member

I've started to pick up the VS Code extension again. Would be nice to have a deploy option that calls ptvsd.enable_attach() before the robot code starts.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Status: Todo
Development

No branches or pull requests

3 participants