Pycharm远程调试环境配置
2014-04-22 13:33
441 查看
1. 环境:
系统环境:win7
软件环境:pycharm 3.1.1
2. 将client端(实际程序执行的环境)的代码所在的路径映射到server端(IDE):
Remote path-代码所在的client端路径是:/home/lovecat/branches/transcoder2.0/src/transcoder/src
Local path-映射到本地server端的路径是:N:/branches/transcoder2.0/src/transcoder/src
3. 在server端(IDE)和client端(实际程序执行的环境)都安装上 pycharm-debug.egg:
pycharm-debug.egg在server端pycharm安装目录下
安装命令:
4. 配置server端:
4.1 打开Edit confiurations
4.2 新增一个python remote debug配置:
Local Host Name:server端的ip地址
Port:任意一个不和其他程序冲突的端口
Path Mappings:server端和client端代码所在路径的映射
Local path:参考 【2-Local path】
Remote path:参考 【2-Remote path】
5. 配置client端:
在需要调试的代码开头加上以下代码:
host:server端的ip地址,参考【4-Local Host Name】
port:server端设置的调试环境的端口,参考【4-Port】
stdoutToServer:when this is true, the stdout is passed to the debug server
stderrToServer:when this is true, the stderr is passed to the debug server
6. 启动调试环境:
6.1 启动server端:
6.2 启动client端:
client端启动成功后,server端会有如下输出:
7. 调试:
在server端映射的代码打上断点即可进行调试
系统环境:win7
软件环境:pycharm 3.1.1
2. 将client端(实际程序执行的环境)的代码所在的路径映射到server端(IDE):
Remote path-代码所在的client端路径是:/home/lovecat/branches/transcoder2.0/src/transcoder/src
Local path-映射到本地server端的路径是:N:/branches/transcoder2.0/src/transcoder/src
3. 在server端(IDE)和client端(实际程序执行的环境)都安装上 pycharm-debug.egg:
pycharm-debug.egg在server端pycharm安装目录下
安装命令:
easy_install pycharm-debug.egg
4. 配置server端:
4.1 打开Edit confiurations
4.2 新增一个python remote debug配置:
Local Host Name:server端的ip地址
Port:任意一个不和其他程序冲突的端口
Path Mappings:server端和client端代码所在路径的映射
Local path:参考 【2-Local path】
Remote path:参考 【2-Remote path】
5. 配置client端:
在需要调试的代码开头加上以下代码:
host:server端的ip地址,参考【4-Local Host Name】
port:server端设置的调试环境的端口,参考【4-Port】
stdoutToServer:when this is true, the stdout is passed to the debug server
stderrToServer:when this is true, the stderr is passed to the debug server
import pydevd pydevd.settrace(host='192.168.1.203', port=2315, stdoutToServer=True, stderrToServer=True)
6. 启动调试环境:
6.1 启动server端:
6.2 启动client端:
client端启动成功后,server端会有如下输出:
7. 调试:
在server端映射的代码打上断点即可进行调试
相关文章推荐
- PyCharm+PySpark远程调试的环境配置
- pycharm快捷键、配置virtualenv环境,配置django调试,配置远程调试
- 配置pycharm远程调试的环境(服务器为linux系统)&&服务器上安装tensorflow-gpu及配置cuda环境&&相关问题的解决办法
- 配置QtCreator+CDB远程调试环境(要设置_NT_SYMBOL_PATH和QT_PLUGIN_PATH和Path)
- Py第十一问 PyCharm配置SFTP远程调试Django应用
- 配置QtCreator+CDB远程调试环境(用到了符号表) good
- 使用xshell+xmanager+pycharm搭建pytorch远程调试开发环境
- tomcat远程eclipse调试debug端口配置在linux环境
- 配置Windows 2008 R2 64位 Odoo 8.0 源码PyCharm开发调试环境
- 连接远程linux spark 配置windows 下pycharm开发环境
- VS2013 利用msvsmon远程调试发布到服务器IIS上程序环境配置
- Linux 环境下配置 tomcat服务器远程调试
- Pycharm配置远程调试
- 配置Windows 2008 R2 64位 Odoo 8.0 源码PyCharm开发调试环境
- 配置QtCreator+CDB远程调试环境
- 配置Windows 2008 R2 64位 Odoo 8.0 源码PyCharm开发调试环境
- MAC上PyCharm调试Tensorflow的环境安装与配置
- 配置Eclipse远程调试weblogic应用的环境
- 配置GDB+GdbServer远程调试环境
- PyCharm配置SFTP远程调试Django应用