如何防止Intellij创建临时运行配置并自动切换到该配置 [英] How to prevent Intellij from creating a temporary run configuration and automatically switching to it

查看:42
本文介绍了如何防止Intellij创建临时运行配置并自动切换到该配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我从某个菜单执行未保存的运行操作时,Intellij都会创建一个灰色的运行配置,例如运行单元测试,运行Maven构建或通过菜单项执行其他一些操作(其中有很多获取临时运行配置的方法).

这些未保存的配置将自动切换到.运行任何东西都会更改IDE顶部的运行配置下拉框,但是我从未问过这种行为.

  1. 有没有办法禁用自动切换?我要始终保持对运行配置的选择,阿们.停止为我切换Intellij.
  2. 是否有一种方法可以完全禁用临时运行配置的自动创建?我从不希望被运行配置清单中的临时项目所困扰,这些临时项目后来让我感觉需要清理.首先不要创建杂物,从而消除杂物.

解决方案

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.

  1. 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.
  2. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆