简体   繁体   English

为什么我在远程调试时无法设置从 eclipse 到 python 的路径?

[英]Why am I having trouble settings my paths from eclipse to python when remote debugging?

I am remote debugging python on a raspberry pi from a windows 10 PC running Eclipse.我正在运行 Eclipse 的 windows 10 台 PC 在树莓派上远程调试 python。 I am able to write and execute python scripts remotely.我能够远程编写和执行 python 脚本。 SSH is working fine and I am able to start a debugging session without any problem. SSH 工作正常,我可以毫无问题地开始调试 session。 However, when attempting to debug I keep getting the error但是,在尝试调试时,我不断收到错误消息

树莓派上的错误

I am attempting to set the remote path in the file simpleTest.py below.我正在尝试在下面的文件 simpleTest.py 中设置远程路径。 This has worked previously.这以前有效。 However, for some reason the old settings appear to be getting confused with the attempt to set the remote path.但是,由于某种原因,旧设置似乎与设置远程路径的尝试混淆了。

import pydevd
from pydevd_file_utils import setup_client_server_paths

MY_PATHS_FROM_ECLIPSE_TO_PYTHON = [ ('C:\\Users\\baff6\\workspace\\RemoteSystemsTempFiles\\192.168.1.20\\home\\pi\\', ''), ]
setup_client_server_paths(MY_PATHS_FROM_ECLIPSE_TO_PYTHON)
pydevd.settrace('192.168.1.10', port=5678)

a=1
print( a )

Previously I was remotely debugging a file called mpsTest2 on a different raspberry pi.以前我在不同的树莓派上远程调试一个名为 mpsTest2 的文件。 However, I am no longer working on this file even though Eclipse seems to be trying to find this file in the folder that contains the file that I am working on (in this case simpleTest2.py).但是,即使 Eclipse 似乎试图在包含我正在处理的文件(在本例中为 simpleTest2.py)的文件夹中找到此文件,我也不再处理此文件。

I have no idea where the references to this other file are but I presume they exist in some configuration setting in Eclipse.我不知道对这个其他文件的引用在哪里,但我认为它们存在于 Eclipse 的某些配置设置中。 However, I have looked everywhere and cannot find anything.但是,我到处寻找,找不到任何东西。

Any help in tracking down these settings would be much appreciated assuming I have not missed something very basic in the setup procedure I am following.假设我没有错过我正在遵循的设置过程中的一些非常基本的东西,那么在追踪这些设置方面的任何帮助将不胜感激。

Best wishes, John最好的祝愿,约翰

I probably should have done this first but eventually found that uninstalling PyDev from Eclipse and reinstalling solved the problem.我可能应该先这样做,但最终发现从 Eclipse 卸载 PyDev 并重新安装解决了问题。 This removed the old references and I was able to remotely debug without any problems.这删除了旧的引用,我能够毫无问题地进行远程调试。 I assume it is possible to achieve this end result without having to perform the uninstall/install but am not sure how to do this.我认为无需执行卸载/安装即可实现此最终结果,但不确定如何执行此操作。

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

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