pycharm remote debug python in docker
来源:互联网 发布:解题王软件下载 编辑:程序博客网 时间:2024/06/05 01:12
pycharm remote debug python in docker
下载pycharm 2017开发工具个人版或破解版,其中有remote debug的配置
配置中有docker配置,采用本机docker即可
project配置interpreter,可以添加add remote interpreter
选定docker即可,引用已解决的docker配置
打开项目,添加python remote debug
需要注意的是ip要配置:0.0.0.0
0.0.0.0是用于本机监听所有ip的,理论上用192.168.1.14也应该是可以的,但不能用推荐的localhost进行远程调试
port可以配置固定比如:21000
在代码中头部或main部分引入如下语句import sys
sys.path.append(‘../pycharm-debug.egg’)
import pydevd
pydevd.settrace(‘192.168.1.14’, port=21000, stdoutToServer=True, stderrToServer=True)192.168.1.14为实体机IP
21000为pycharm设定的调试端口
pycharm-debug.egg
文件是在pycharm安装包下面remote debug目录下找到的,放到项目路径或其他路径下,主要用于加载实际的egg包,便于调试
启动debug模式,控制台会输出如下信息,即表示成功连接了
Starting debug server at port 21000
Use the following code to connect to the debugger:
import pydevd
pydevd.settrace(‘0.0.0.0’, port=21000, stdoutToServer=True, stderrToServer=True)
Waiting for process connection…
Connected to pydev debugger (build 172.3757.67)
Warning: wrong debugger version. Use pycharm-debugger.egg from PyCharm installation folder.
关键的事情是IP不对应可能导致不能调试docker下启动的应用
- pycharm remote debug python in docker
- Remote debug in windows
- PySpark in PyCharm on a remote server
- Pycharm远程调试之ssh remote debug (一)
- Pycharm远程调试之ssh remote debug(二)
- Pycharm远程调试之ssh remote debug(三) -- Before Launch
- Pycharm远程调试之Docker debug(三) -- docker on linux
- Java remote debug in jdk 5.0
- Python在pycharm中的调试(debug)
- Pycharm远程调试之Docker debug(一) -- Let do it
- Pycharm远程调试之Docker debug(二) -- 端口映射
- debug python in ipython
- Debug your PHP in Docker with Intellij/PHPStorm and Xdebug
- remote debug with Tomcat
- Remote debug二三事
- vs remote debug
- Jboss Remote Debug Configure
- Java Remote Debug
- JSTL标签库不起作用,直接输出表达式。
- 我的第一篇CSDN
- hdu 5970 最大公约数
- 英译词典
- Peter的烟
- pycharm remote debug python in docker
- SQL创建函数
- poj_2253_Frogger
- Windows Server 2012 R2配置IIS搭载PHP发生HTTP500解决办法
- webgl——使用FBO实现离屏渲染
- Codeforces Round #432 (Div. 2) (Codeforces 850C) E. Arpa and a game with Mojtaba 博弈+状态压缩
- 转载:JNI 编写动态链接库 HelloNative 详细过程(也即用Java和C在Linux下动态生成并使用so文件过程)
- REDIS之内存分配MALLOC底层实现(转)
- vm的cpu通过cgroup来隔离