Codex starts new PyCharm instead of opening file in existing PyCharm
What version of the Codex App are you using (From “About Codex” dialog)?
Version 260205.1301 (554)
What subscription do you have?
Enterprise
What issue are you seeing?
Using PyCharm as the default app, files open in a different version of PyCharm than the running one.
What steps can reproduce the bug?
Use a Codex session in a PyCharm managed project.
Use JetBrains Toolbox to install more than one version of PyCharm. This is really common when trying out betas and release candidates or backrevving the IDE to avoid a defect.
Set the default open app in Codex to "PyCharm".
The file often opens in a new instance of a different version of the PyCharm app, ignoring the fact that the project is already open in PyCharm, or that PyCharm is running.
At the very least, it should use the running PyCharm in preference to launching a new instance.
What is the expected behavior?
The file opens in the already running instance of PyCharm.
Additional information
This is a sublety that is affected by how Launch Services is called to open a file. It can be reproduced with command line commands where using the application name will open _some_ version of PyCharm, not necessarily the desired one.
open -a PyCharm noxfile.py
but open by bundle identifier will use the already running app, because it's searching the open apps list first.
open -b com.jetbrains.pycharm noxfile.py
Come to think of it, a way to customize the "open" action with a shell command or a macOS Shortcut would be a nifty feature.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗