简体   繁体   English

使用PyDev创建一个远程项目

[英]Creating a remote project with PyDev

I'm new to Eclipse/PyDev and have what's probably a really basic question. 我是Eclipse / PyDev的新手,可能有一个真正的基本问题。 I want to use it to edit and debug python files on a remote system. 我想用它来编辑和调试远程系统上的python文件。 I am able to do this using RSE and pydevd, but what I'm doing doesn't really seem integrated with the IDE. 我可以使用RSE和pydevd做到这一点,但是我正在做的事情似乎并未与IDE集成在一起。 That is, I can go to the RSE perspective and edit the files. 也就是说,我可以转到RSE透视图并编辑文件。 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. 但是这些文件不是Eclipse为我维护的项目的一部分。 It's all fairly disjointed. 一切都脱节了。 Is there a way to make remote files part of an Eclipse project? 有没有办法使远程文件成为Eclipse项目的一部分? I can drag the files into the project, but that makes a local copy. 我可以将文件拖到项目中,但这会生成本地副本。 Am I just approaching this wrong? 我只是在解决这个错误吗?

Thanks, Jerry 谢谢,杰里

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." 从RSE角度,右键单击包含您的源文件的文件夹,然后选择“创建远程项目”。 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. 这似乎工作得很好,但是我仍然有一个问题:调试器似乎想要我正在调试的文件的本地副本,并且认为RSE副本不够本地。 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. 这有点违反集成的目的。

Is there a better way? 有没有更好的办法? I'm looking at SSH filesystems, but really don't want to have to do that. 我正在查看SSH文件系统,但确实不想这样做。 It feels like I'm so close. 感觉我很亲近。

Edit 2011-11-09: This has recently been addressed by the PyDev developers. 编辑2011-11-09:PyDev开发人员最近已解决了此问题。 As of today, installing the nightly PyDev update adds an option to fetch source from the remote server. 从今天开始,安装每晚的PyDev更新会添加一个从远程服务器获取源的选项。 Details here . 详细信息在这里

I ran in to this issue a while back ,I answered this question in the link below. 我前一段时间遇到这个问题,我在下面的链接中回答了这个问题。 Unfortunately, with eclipse you cannot setup a remote interpreter with the RSE package. 不幸的是,使用Eclipse无法使用RSE软件包设置远程解释器。 I use Pycharm ( python Jetbrains IDE). 我使用Pycharm(python Jetbrains IDE)。 And it has been working great for me for about a year now. 大约一年来,它一直对我有效。 You do have to pay for it, its a nominal amount but worth it. 您确实需要为此付出代价,这是一个名义金额,但值得。 https://stackoverflow.com/a/15360958/1702186 https://stackoverflow.com/a/15360958/1702186

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM