1

I want to use eclipse, pydev to remote debug my python script. Python script is on a remote Ubuntu server, and Eclispe/pydev is running on my Windows 7 machine.

I followed every step according to this one. http://pydev.org/manual_adv_remote_debugger.html

The problem is in the last step of configuring path in pydevd_file_utils.py on server, it does not recognize the change. This is what I changed:

PATHS_FROM_ECLIPSE_TO_PYTHON = [(r'c:\EZ_Green\plugins', r'/home/jiechao/EZ_Green/plugins')]

When I run the script, it gives me such error.

pydev debugger: warning: trying to add breakpoint to file that does not exist: /home/jiechao/EZ_Green/plugins/D:/EZ Green/backend/getData.py (will have no effect)

Seems the change does not apply, has anyone done this before or have any ideas?

Thanks a lot

-----------------update 1--------------

So I solve the previous problem and now here is the new problem.

This is the output of program, and it seems the path configuration is correct. Debug Server at port: 5678 pydev debugger: replacing to server: D:\EZ Green\Product\EZ_Green\plugins\test.py pydev debugger: sent to server: /home/jiechao/EZ_Green/plugins\test.py pydev debugger: replacing to client: /home/jiechao/EZ_Green/plugins/test.py pydev debugger: sent to client: D:\EZ Green\Product\EZ_Green\plugins/test.py

But eclipse does not stop at the breakpoint, not even at pydevd.settrace() I have no idea why it does not stop. When I use remote debug on local machine, it works pretty well. When I want to debug on a remote server machine, it does not work. I don't know what's the problem.

------------------update 2---------------------

Problem solved. The script on my client and server turns out to be a little different. So I did not see the breakpoint it stopped. I am so stupid!

Thanks anyway.

4

1 回答 1

1

即使这可能不是您期望的确切方法,一种选择是从命令行启动 Unittest 并通过 RemoteDebugServer 通过“pydevd.py”附加调试器。

这现在是 ePyUnit 的一个完全自动化的选项,其中包括通过“pydevd.py”使用 PyDev 和 Eclipse 进行远程调试的自动化。这可以无缝地用于“子进程”以及独立启动的命令行进程。

主机名和端口号可根据需要更改,默认为 localhost:5678.

看:

对于远程调试的基础知识:

还增强了与 PyUnit 的 unittest 集成。

欢迎评论和修复。

玩得开心。

于 2016-07-26T07:07:34.373 回答