禁止STS/eclipse 的Console 窗口自动切换

最近使用STS进行微服务项目的开发。因为同时启动几个spring boot项目,当一个console报错时,查看报错日志时会经常因为其他程序有输出或报错而自动切换Console,给调试错误带来很大不便。记录下解决方法。
1、在Console窗口上面,有个Pin 按钮,点击选中后,可以保持选中Console一直处于最前面。
禁止STS/eclipse 的Console 窗口自动切换
文章图片

2、在Console 窗口上面,有个Scroll Look按钮,点击后即锁定输出界面,但是一手动滚动日志最底部,即自动解除锁定。
禁止STS/eclipse 的Console 窗口自动切换
文章图片

以上只是解决的Console间自动切换的烦恼,但当我们在使用Search等窗口时候,当Console有输出时,还是会跳出Console窗口。解决方式如下。
通过系统设置进行设置:Windows/Preferences/Run Debug/Console。这里面是STS提供的对Console的配置选项。禁用掉这两个选项即可。
【禁止STS/eclipse 的Console 窗口自动切换】禁止STS/eclipse 的Console 窗口自动切换
文章图片

Show When Program Writes to Standard Out This preference will force the console to show when something is written to the system out stream. A forced-show can mean that a console will be opened, or that the console will be brought to the top if it is already open.
Show When Program Writes to Standard Error This preference will force the console to show when something is written to the system err stream. A forced-show can mean that a console will be opened, or that the console will be brought to the top if it is already open.

    推荐阅读