[Solved]Pycharm remote debugging local file not updating

已完成

Tried to restart PyCharm and everything's alright.

-----

Hi, I'm using Pycharm 2016.3 Professional edition's remote debugging. However, something weird happened.

After I modified local files and upload to remote servers, I tried to remote debugging using the remote interpreter. But when I stepped into other function inside other files of my project, I found that the files were located at local path such as ~/.PyCharm2016.3/system/remote_sources/-1117781397/-12687924/path/to/my/file but it was not updated to the newest.

To make sure I did sync files to my remote server, I ssh to the remote server and make sure that the files have changed correctly.

Also, I tried to use the remote interpreter to run my code, whose result was correct which differed from what using remote debug.

So I want to know is there something wrong or do I have a method to update local caches of remote files? Please forgive my poor English and I am looking forward to some help.

5

Hello Sergey Karpov

I did it on Request #2430827, don't hesitate if you need more informations.

Thank's !

0

Bbc-abc Did you create a ticket for this issue, I also have an issue in 2020.1 where the debugger is using an old cached version of the files that are not updated. I can see that docker-compose is refreshing the files fine but the Pycharm debugger is caching the files at the time docker-compose last built.

Please post any valid tickets.

1

Maxime Renaud What is #2430827? Have you filed a new issue?

1

This problem still exists with 2020.1.4 Professional! 

This is crazy annoying. Resetting the interpreter helps only for a microsecond, after one run it is back to the same old problem of debugging old cached files. 

4

Hello, 

 

Regrettably, there is a bug that has not been fixed yet, please see https://youtrack.jetbrains.com/issue/PY-39396 try the workaround provided and vote for the issue to increase its priority. 

 

0

This problem still exists with 2020.2Professional! 

This is crazy annoying. Resetting the interpreter helps only for a microsecond, after one run it is back to the same old problem of debugging old cached files. 

2

PyCharm 2020.3.3 (Professional Edition)
Build #PY-203.7148.72, built on January 26, 2021

Still happening; trying to debug Python under WSL, which requires the remote feature (and therefore the Professional Edition) is yielding very confusing experiences with the breakpoints of the up-to-date file, but the source of the out-of-date file.

Visual Studio Code (with WSL remote and WSL:Ubuntu extensions) worked out of the box with no additional configuration.

0

PyCharm 2021.1 (Professional Edition)
Build #PY-211.6693.115, built on April 6, 2021
VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o.
Linux 5.8.0-50-generic
 (0.2.144.3766-211)
Current Desktop: ubuntu:GNOME

Im not one to usually complain, I love everything else about this product but this is STILL happening and every subsequent update is making it worse! I have been putting up with it each version by simply exiting the incorrect cached JavaScript file and continuing to work but as of this most recent version the IDE editing window will bring up the incorrect cached copy of the JavaScript file (as it have for several years now) where i have placed the breakpoint but NOW it crashes the entire editing window meaning I have to completely quit and restart PyCharm. I have tried every fix on this thread and I am yet to see a competent answer or setting change that stops the IDE from bringing up this cached file. Someone please explain this and make it stop happening. 

1

I have the same issue with Python debugging in Pycharm 2021.1 :(. 

0

I'm facing the same issue in run / debug mode! when changing branch / pull code from git the remote files are not been updated, they are updated only by manually changing to other interpreter, then replacing back to the old one and performing complete upload & sync! 

This is a major error for lots of developers who work on servers! it seems like the problem exists from 2017 and have not been addressed yet!

Antonina Belianskaya Sergey Karpov

0

Why is this marked completed? I am facing this same issue in 2022. It's extremely annoying that remote debugging is not picking up changes from local files but uses remote_sources

0

Yup, I already reported this problem here years ago, and it's still not solved at all. No idea why it says "solved", it simply isn't - nothing ever changed for me at all. I'm working on Windows 10, using a remote server on Ubuntu 18.

0

This is  definitely not solved at ALL. Does who marked this issue as solved?

I'm using this tool as DCC script support, and local remote debugging is a lot easier than before, but this issue make everything messy.

0

Jooyounglee93 Here's a related issue https://youtrack.jetbrains.com/issue/PY-49805 (currently open)

I would appreciate if you post the steps to reproduce the issue, starting from creating a minimal project. Unfortunately, it appeared to be not very easy to reproduce the issue in the test environment. And, the absence of clear steps is what's holding this issue from resolving, I think.

1

Okay, I will describe just as what I did.

0
 

 Here's a related issue https://youtrack.jetbrains.com/issue/PY-49805 (currently open)

I would appreciate if you post the steps to reproduce the issue, starting from creating a minimal project. Unfortunately, it appeared to be not very easy to reproduce the issue in the test environment. And, the absence of clear steps is what's holding this issue from resolving, I think.

 
In the linked issue, it says it was reproduced and in a comment your colleague Mr. Golubev says the what's holding the up is that you want to redo the whole system.
 
You are saying now it is the missing steps for reproduction.
 
What is it now?
 
I also have this problem and simply can't continue work.
I'm furious that this issue exists since years.
 
Can't you at least explain how to invalidate that link to remote files downloaded by older versions of PyCharm? Since your "Invalidate Caches" functionality seems to be not thorough enough?
 
EDIT: I just even saw, you triaged it as "Reproduced". So you are contradicting yourself...
 
0

Lucas St.

Can't you at least explain how to invalidate that link to remote files downloaded by older versions of PyCharm? Since your "Invalidate Caches" functionality seems to be not thorough enough?

You can manually remove the "remotue_sources" directory from the system directory to force PyCharm to update them. You can also e.g. create a shell script to clean this directory, add it to PyCharm as an external tool, and assign a shortcut for it. Then invoke "Rescan available python modules" (also can be assigned to a shortcut). I understand this is a quirky workaround and will cause a full rebuilding of skeletons, which may take some time.

>I just even saw, you triaged it as "Reproduced". So you are contradicting yourself...

In my comment I described the steps to reproduce the issue, but later noted my test was flawed. I admit that I missed/forgot about Mikhail's comment on the new implementation. We are actively testing this feature now and according to the current roadmap, planning to enable it in 2022.1

0

I have deleted (or moved) it previously. It did not help.

This is actually what causes the issue.

If you delete the remote sources, they are still in listed in some index, but the files are missing.
PyCharm then does not redownload because they are still in the index.
I think the index is one of these files (I grepped them):

index/filenameindex/FilenameIndex.storage.keystream
index/filenameindex/FilenameIndex_inputs.values
caches/names.dat.keystream

But I was not brave enough to delete them yet.

1

That's weird. In my case, removing the remote_sources and reopening the project had always completely resolved any inconsistencies between local and remote libraries. I will look into those indexes to get more info on how to clear them.

0

Removing remote_sources is working for me as is selecting another interpreter and switching back to my remote one. It is however unworkable to have to do this? Has a permanent fix been identified? 

 

I am running on Ubuntu 21.04 and running on PyCharm 2022.1 Professional.

 

 

0

Similar issue.

I am working with interpreter on WSL (Ubuntu), project files located on WSL as well.
Debugger works fine until Pycharm (2022.2) tries to open a module installed via pip (all libraries on WSL).

Python 3.9, libraries in /home/<username>/.local/lib/python3.9/site-packages

0

Vlad K

Could you please submit a bug report to https://youtrack.jetbrains.com with the steps to reproduce the issue, the expected and actual results?

0

Andrey Resler

still have this same problem, on macOS.

Should I submit a bug report?

0

If you are having the same problem in PyCharm 2022.3 or newer, please submit another ticket to https://youtrack.jetbrains.com/issues/PY and provide steps for reproducing the problem.

0

STILL unsolved, PyCharm 2023.1.4, remote_sources are not updated properly, bad bad bad

0

请先登录再写评论。