Terminal in PHPStorm won't remember last working directory?
PHPStorm won't remember my working directories after a restart of the app.
I tried manually putting this in .idea/workspace.xml, without luck. PHPStorm just removes these entries if app quit.
<component name="TerminalArrangementManager">
<option name="myTabStates">
<TerminalTabState tabName="ojs" currentWorkingDirectory="$PROJECT_DIR$" />
<TerminalTabState tabName="pkp-lib" currentWorkingDirectory="$PROJECT_DIR$/lib/pkp" />
<TerminalTabState tabName="ui-library" currentWorkingDirectory="$PROJECT_DIR$/lib/ui-library" />
<TerminalTabState tabName="googleScholar" currentWorkingDirectory="$PROJECT_DIR$/plugins/generic/googleScholar" />
</option>
</component>
I have already read the following:
- https://intellij-support.jetbrains.com/hc/en-us/community/posts/360010194720-Did-terminal-used-to-remember-the-last-directory
- https://intellij-support.jetbrains.com/hc/en-us/community/posts/360010194720-Did-terminal-used-to-remember-the-last-directory
I have tried with and without the new Terminal.
Environment information:
- PHPStorm 2024.3 Build #PS-243.21565.202
- Ubuntu 22.04
- Installed .deb version from website
请先登录再写评论。
I have been playing around a bit more.
The “TerminalArrangementManager” is not written in .idea/workspace.xml at all. If present, it's removed at app exit.
If I open the terminals from mouse right click > Open In > Terminal, the state is remembered after a restart. But I can't find where this setting is saved. In all .idea directory, there is no entry.
I managed to get it working in IntelliJ IDEA 2024.3 (Ultimate Edition), Build #IU-243.21565.193, built on November 13, 2024 with the help of your post and the screenshot in the thread you linked to.
Procedure:
IntelliJ will now start that terminal tab at the given location every time you start that project.
If you cd to some other location in that terminal, it will “snap back” to the configured location on next startup.
If you close the terminal, the entry will be removed from xml file and you will have to repeat this procedure again.
I hope this will be as helpful to you as it has been to me. Good Luck!
You are welcome to follow the progress in the YouTrack ticket.
See https://intellij-support.jetbrains.com/hc/en-us/articles/207241135 if you are not familiar with our bug tracking system.