How to debug a remote python application with (Python Tools for) Visual Studio?

霸气de小男生 提交于 2019-12-22 05:09:22

问题


According to http://pytools.codeplex.com/, PTVS supports "Local and remote debugging". However, I couldn't find anything related to it or.

So I'm curious if their "remote debugging" is simply attaching to a running process on the same machine or if there's some actual remote debugging support over TCP/IP available. I'd like to use PTVS for a WSGI-based web applications running on apache on another (linux) machine, but without a proper remote debugger (such as WinPDB, which is not that bad but sonmething integrated in the IDE would be better) it's not really useful...


回答1:


Remote debugging for platforms other than Windows was not available until 2.0 alpha release, but it is possible now - see the documentation or the video tutorial for details.




回答2:


There's a couple of different ways to get into remote debugging. The main scenario is probably our MPI cluster debugging. There you can create a new MPI project, set it up to launch to the Windows HPC cluster, and we'll deploy everything needed onto the cluster and setup the remote debugging session.

The "deploy everything needed" part though can be done on your own for normal remote debugging scenarios. This is more or less just standard VS remote debugging with the addition of having PTVS installed. The basic steps for this are: 1) Install the Visual Studio remote debugger components on the remote machine 2) Install PTVS onto the remote machine 3) Start the VS remote debugger monitor (msvsmon)

Then you can do Debug->Attach to Process, select the machine, and start debugging.




回答3:


Yes, for remote debugging you do need VS + PTVS installed on the remote machine currently, which implies windows only. If you want to see this feature implemented, vote for this ticket here (which also has a few details on the situation): http://pytools.codeplex.com/workitem/536



来源:https://stackoverflow.com/questions/7739381/how-to-debug-a-remote-python-application-with-python-tools-for-visual-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!