使用 PyDev 创建远​​程项目 [英] Creating a remote project with PyDev

查看:37
本文介绍了使用 PyDev 创建远​​程项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Eclipse/PyDev 的新手,有一个可能是非常基本的问题.我想用它来编辑和调试远程系统上的 python 文件.我可以使用 RSE 和 pydevd 来做到这一点,但我所做的似乎并没有真正与 IDE 集成.也就是说,我可以转到 RSE 透视图并编辑文件.然后我可以在远程系统上启动脚本并在调试器中逐步执行它.但是这些文件不是 Eclipse 为我维护的项目的一部分.这一切都相当脱节.有没有办法让远程文件成为 Eclipse 项目的一部分?我可以将文件拖到项目中,但这会生成本地副本.我只是在接近这个错误吗?

I'm new to Eclipse/PyDev and have what's probably a really basic question. I want to use it to edit and debug python files on a remote system. I am able to do this using RSE and pydevd, but what I'm doing doesn't really seem integrated with the IDE. That is, I can go to the RSE perspective and edit the files. I can then lauch the script on the remote system and step through it in the debugger. But the files are not part of a project that Eclipse maintains for me. It's all fairly disjointed. Is there a way to make remote files part of an Eclipse project? I can drag the files into the project, but that makes a local copy. Am I just approaching this wrong?

谢谢,杰瑞

推荐答案

好的,一旦你找到它,结果不仅简单而且很明显.从 RSE 角度,右键单击包含源文件的文件夹并选择创建远程项目".这似乎工作得相当好,但我仍然有一个问题:调试器似乎想要我正在调试的文件的本地副本,并且认为 RSE 副本不够本地.所以现在我必须在开始调试之前将文件从远程服务器复制到我的工作站.这有点违背了整合的目的.

OK, it turns out to be not only simple but rather obvious once you find it. From the RSE perspective, right-click the folder containing your source files and select "Create Remote Project." This seems to work fairly well, but I'm still having one problem: It seems the debugger wants a local copy of the file I am debugging, and does not consider the RSE copy local enough. So now I have to copy the file from the remote server to my workstation before I start debugging. It kind of defeats the purpose of the integration.

有没有更好的办法?我正在研究 SSH 文件系统,但真的不想这样做.感觉就像我很接近.

Is there a better way? I'm looking at SSH filesystems, but really don't want to have to do that. It feels like I'm so close.

编辑 2011-11-09:PyDev 开发人员最近解决了这个问题.截至今天,安装每晚 PyDev 更新添加了从远程服务器获取源的选项.详情此处.

Edit 2011-11-09: This has recently been addressed by the PyDev developers. As of today, installing the nightly PyDev update adds an option to fetch source from the remote server. Details here.

这篇关于使用 PyDev 创建远​​程项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆