Two debug tabs are being opened for each app

已回答

Hello,

I've been having a strange issue for a while with IntelliJ: when I run any app from my project, it opens 2 different tabs. Sometimes, I have to launch 5 servers/apps at the same time, so it gives me 10 different tabs, which is a real pain to navigate through.

The strange thing is that each of these top-level tabs have 2 sub-tabs (Console and Debugger), but only one of the sub-tab is useful in each top-level tab. What I mean is that there is a Console sub-tab in each of the 2 top-tabs, but the console output only shows up in one of the two. Same thing for the debugger tab: only one of the 2 debugger tabs actually does anything.

I see that the debugger tab of the first top-level tab connects to "127.0.0.1:53668", and the other debugger tab connects to "localhost:53740".

If I start a project from scratch, there is only a single tab, so it must be related to my big project's config, but I have tried a bunch of things and I cannot see how to have only 1 tab per app. Could it be related to a specific gradle instruction? Or to some setting in the run/debug config window? The icon of the 2nd tab also looks like the remote debugging icon, so maybe it has something to do with it?

I know it suddenly started doing this after updating IntelliJ (already several months ago).

I put a screenshot here below to show you how it looks like.
Any idea how I can merge these 2 tabs back into 1?

0

Hello, 

Please check your run/debug configurations. As I see, once you start debugging, 2 debug configurations are being started ("FaeriaServer:GameServer" and ":GameServer"). There is a possibility that you have "Run Another Configuration" option configured for one of these configurations (under "Before launch" section). 

0
Avatar
Permanently deleted user

Thanks for replying so quickly!

You're right, when I start debugging I get these two windows. First, only the "FaeriaServer:GameServer" one, then a few seconds later the ":GameServer" opens too.

I don't have any "Run Another Configuration" set in the "Before launch" section. Here's what it looks like for the GameServer run config:

I don't know if it matters, but to run the app I open the "Gradle" menu, then go to GameServer->Tasks->application->right click on run and pick "Debug" (once that's done I generally just use the shortcut to pop the Debug configs menu and run it from there).

0
Avatar
Permanently deleted user

I just tested to create a new Gradle project with all the default settings, and there I'm getting exactly the same thing. The other project I tested on was actually not a Gradle project (it was using maven), but so it looks like it's not related to my project config, but rather to the IntelliJ interaction with Gradle.

The second tab pops up when gradle is launching the app, and it closes as soon as the app completes (so if I just print "Hello World", the second tab appears very briefly before disappearing).

I should have specified that I'm using IntelliJ IDEA 2019.1.3 (but I had the bug in earlier versions as well).

0
Avatar
Permanently deleted user

Thank you, this is indeed exactly what I'm encountering. At least I know I'm not the only one that is really annoyed by that. I hope you will find a solution for the the next update.

0

请先登录再写评论。