问题描述
Pycharm Remote Debug 时出现:
Remote file xxxxxxxxx is mapped to the local path xxxxxxxxxxxxx and can’t be found.
You can continue debugging, but without the source.
To fix that you can do one of the following:
(1)xxxxx (2)xxxxx (3)xxxxxxx
查找Google相关问题,方法有:检查Path中是否存在特殊字符,检查pydevd-pycharm和pydevd版本兼容问题等,均未解决问题。
最终解决方法:uninstall掉虚拟环境中的jupyter-notebook包,该包由Pycharm在打开ipynb文件时,提示安装,uninstall之后,fix了问题。
python ssh interpreter debug:
ssh://name@ip:port/home/name/miniconda3/envs/paddle/bin/python -u /home/name/.pycharm_helpers/pydev/pydevd.py --cmd-line --multiproc --qt-support=auto --client 0.0.0.0 --port 44115 --file /home/name/workspace/some_dir/xxxxx.py
-u : -unbuffered stderr v.s. stdout
pydevd.py : 解析参数,执行run函数和_exec函数,调用pydev_imports.execfile(file, globals, locals)函数,进而调用builtin_compile和builtin_exec内置函数–>system call(C底层实现)