生活分享

  • 首页
HETAO
业余码农、业余机械爱好者
  1. 首页
  2. 未分类
  3. 正文

pycharm remote docker debug with external sources

2018年1月19日 583点热度 0人点赞 0条评论

 

Great IDE pycharm can easy debug with docker-compose.yml file. But default guid not metioned how to config debug with external sources. If Problem happend in external sources ,I have to stupid add sources to my project for debug. After Google a lot ,it seems like path mapping problem. What important is the breakpoint you locate can not be in pycharm cache, you can check this when move cursor to the source tab shows the path.

Solution(Menu:Pycharm>Project Interpreter):

  1. Click dots in the end of "Path mappings"
  2. find your local python path ,if you using py3 in mac the path should looks like "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4"
  3. Add two mappings ,below is my config

"/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-package" : "/usr/local/lib/python3.4/site-package"

"/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4":"/usr/local/lib/python3.4"

After all done you need to referesh remote sources, maybe not but i did. Then pycharm will reindex soruces ,wait a few minites, you can check with command+B jump to external sources , if path changed to your local sites-package location its success.

Post Views: 673
标签: 暂无
最后更新:2018年1月19日

jinzhao

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

COPYRIGHT © 2022 生活分享. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

浙ICP备14004285号-1