I am using PyCharm professional edition 2018.1 I am using remote interpreter via ssh. As a result, when I use shortcuts to Inspect Code (e.g. look at the source of a function I am using in the main script), the tab that opens refers to a file on the remote server /system/remote_resources/.../...
This is quite annoying because this is not the file I need to modify, since it is just a temporary copy of the local file and it already happened to me to modify the remote file, which has no effect on the execution.
Is there a way for PyCharm code inspection to open the local script, rather than the remote copy?
This is how I configure the ssh connection. No path mappings are set.
From the main menu, select Code | Analyze Code | Run Inspection by Name… or press Ctrl+Alt+Shift+I .
PyCharm integrates with ESLint which brings a wide range of linting rules that can also be extended with plugins. PyCharm shows warnings and errors reported by ESLint right in the editor, as you type. With ESLint, you can also use JavaScript Standard Style as well as lint your TypeScript code.
You need to specify path mappings for particular run configuration or interpreter.
After that your local files will point to the remote ones.
E.g. /User/local/project= /User/remote/project
Path mappings for the interpreter:
Pycharm > Preferences > Project > Project Interpreter > Click on Project
Path mappings for run configurations:
Run > Edit configuration > Choose run cofig > Choose remote interperter > Fill in mappings
Just to be clear it will still cache some files: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206593675-Path-Mappings-does-not-work-for-me
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With