Path Mappings does not work for me

I'am using the remote python interpreter and remote debugging. I am developing on a Mac and I'am running on an linux box. I have mounted my home directory on the Linux machine on my Mac:

OSX -> /User/patrikt/patrikt-linux

Linux -> /home/patrikt

The project is located at:

/home/patrikt/pycharm/proj

I have tried all possible variations on mapping:

/User/patrikt/patrikt-linux= /home/patrikt

/User/patrikt/patrikt-linux/pycharm = /home/patrikt/pycharm

/User/patrikt/patrikt-linux/pycharm/proj= /home/patrikt/pycharm/proj

However what ever I do "go to->implementation" will open up a file in the cache instead of the actual file. Please, please help me solve this.

Regards,

Patrik

5 comments
Comment actions Permalink

Thats not a bug, but a feature :-)

All navigation should perform on local code, so PyCharm copies all python libraries and generated skeletons from remote host to local cache. If you put breakpoint in any file from cache it will be mapped automaticly in runtime to correct file on your remote machine.

Mapping /User/patrikt/patrikt-linux= /home/patrikt is correct one.

0
Comment actions Permalink

Thanks for your answer. I think it would be a better feature if pycharm could "detect" that you have mapped the remote folder to a local folder so no caching is neccesary :-)

Regards,

Patrik

0
Comment actions Permalink

I am having the similar problem.

I checked the path mapping, I could upload/sync the direcotry successfully. In debug mode it reaches to file in cache instead of file in my working dir.
My path mapping :

C:/work/nlc_windows/bitbucket_on_windows/apps-2                 /home/ss/work/nlc/bitbucket/windows_mount/apps-2

I am using pycharm 2017.2 Professional 

0
Comment actions Permalink

After some research I realized that my path mapping fails when I have *.egg files present (/usr/local/lib/python2.7/dist-packages/*.egg). If I remove them then debugging works smooth. 

I have added Before Launch Script in my run configuration to clear *.egg files before every execution/run. 

0
Comment actions Permalink

Hi Shaikh,

Is it possible to try it in the latest PyCharm version or EAP build (https://www.jetbrains.com/pycharm/nextversion/)?

0

Please sign in to leave a comment.