如何使用(Python Tools for)Visual Studio 调试远程Python应用程序?
根据 http://pytools.codeplex.com/,PTVS 支持“本地和远程调试”。但是,我找不到任何与之相关的内容。
所以我很好奇他们的“远程调试”是否只是简单地附加到同一台机器上正在运行的进程,或者是否有一些通过 TCP/IP 的实际远程调试支持。我想将 PTVS 用于在另一台(linux)机器上的 apache 上运行的基于 WSGI 的 Web 应用程序,但没有适当的远程调试器(例如 WinPDB,这还不错,但集成在 IDE 中的方法会更好)这并不是真正有用...
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...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Windows 以外的平台的远程调试直到 2.0 alpha 版本才可用,但现在可以了 - 请参阅 文档或视频教程了解详细信息。
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.
有几种不同的方法可以进行远程调试。主要场景可能是我们的MPI集群调试。您可以在其中创建一个新的 MPI 项目,将其设置为启动到 Windows HPC 集群,我们将把所需的所有内容部署到集群上并设置远程调试会话。
不过,对于正常的远程调试场景,“部署所需的一切”部分可以由您自己完成。这或多或少只是标准的 VS 远程调试,此外还安装了 PTVS。其基本步骤是:
1) 在远程机器上安装Visual Studio远程调试器组件
2) 在远程计算机上安装 PTVS
3)启动VS远程调试器监视器(msvsmon)
然后可以进行Debug->Attach to Process,选择机器,开始调试。
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.
是的,对于远程调试,您当前需要在远程计算机上安装 VS + PTVS,这意味着仅限 Windows。如果您想看到此功能的实现,请在此处投票支持此票(其中也有有关情况的一些详细信息):
http://pytools.codeplex.com/workitem/536
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