What's the easiest way to open the same place in code from Pycharm to VSCode and vice-versa?

107 views Asked by At

Say you are editing code in one IDE and want to open the same file and place the caret at the same place in the other IDE. How would you do that between Pycharm and VSCode?

Is there a pair of extensions for that? Or a standard way of noting said place so that you can copy it from one IDE and paste it into the other?

I've looked around but couldn't find any info (maybe I didn't hit the right keywords).

1

There are 1 answers

0
LoneCodeRanger On

Okay, so I found an answer for the direction Pycharm -> VSCode:

In Pycharm:

Hit Edit > Copy Path/Reference > Path With Line Number.
You should get a path of the form path/to/file:lineNumber.

In VSCode:

Hit Ctrl + P (command palette) > Ctrl + V (paste) > Enter.

I haven't looked for the other way around (VSCode -> Pycharm), yet.