如何防止Intellij创建临时运行配置并自动切换到该配置 [英] How to prevent Intellij from creating a temporary run configuration and automatically switching to it
问题描述
每当我从某个菜单执行未保存的运行操作时,Intellij都会创建一个灰色的运行配置,例如运行单元测试,运行Maven构建或通过菜单项执行其他一些操作(其中有很多获取临时运行配置的方法).
这些未保存的配置将自动切换到.运行任何东西都会更改IDE顶部的运行配置下拉框,但是我从未问过这种行为.
- 有没有办法禁用自动切换?我要始终保持对运行配置的选择,阿们.停止为我切换Intellij.
- 是否有一种方法可以完全禁用临时运行配置的自动创建?我从不希望被运行配置清单中的临时项目所困扰,这些临时项目后来让我感觉需要清理.首先不要创建杂物,从而消除杂物.
2021.1版本不再具有此设置,
Intellij will create a greyed-out run configuration every time I execute an unsaved run operation from some menu, be that run a unit test, run a maven build, or some other execution from a menu item (there are a lot of ways to get a temporary run configuration).
These unsaved configurations are automatically switched to. Running anything changes the run configuration dropdown box at the top of the IDE, but I never asked for this behavior.
- Is there a way to disable the automatic switching? I want to maintain my selection of the run configuration always and forever, amen. Stop Intellij from switching it for me.
- Is there a way to disable the automatic creation of temporary run configurations, altogether? I never want to be bothered with temporary items in the run configuration inventory that I later feel like I need to clean up. Removes the clutter by never creating them in the first place.
2021.1 version no longer has this setting, issue reported.
As a workaround you can close the project and edit .idea/workspace.xml
file manually.
Under <component name="PropertiesComponent">
node add/edit the following:
<property name="recentsLimit" value="0" />
For 2020.3.x and earlier versions:
Run/Debug Configurations | Templates | Temporary configurations limit: 0.
这篇关于如何防止Intellij创建临时运行配置并自动切换到该配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!