Give Intellij IDEA Visual Studio F5, F10, and F11 Functionality

In Visual Studio F5 , it is used both to start debugging and to resume the program after starting debugging (or "continue"). Intellij has separate debugging commands ( Shift + F9 ) and resumes the F9 program).

Pressing F9 (resuming program) when the debugger is not running brings up a context menu with a list of startup configurations, and pressing Shift + F9 (starting debugging) when the debugger starts, starts a new instance of the program and kill the old instance (!). I can match F5 to both resume the program and start debugging, but it behaves as if it were displayed to resume the program alone. Instead, I would like F5 to resume the program if the debugger is running, and start debugging otherwise.

Is there a way to change the key functionality in Intellij based on whether the debugger is running so that I can act like F5 in Visual Studio?

In the corresponding note, is there a way to make F10 and F11 (Step Over / Step Into) start debugging on the first line if the debugger is not already running, just like in Visual Studio?

+4
source share
1 answer

... when you press Shift + F9 (start debugging) when the debugger is running, it appears to launch a new instance of the program and kill the old instance (!)

By default, entering Shift + F9 during a debugging session launches a new instance in a new tab in the debug tool window. The old instance is still running in a separate tab. If you have the option "Only one instance" selected in the "Run / Debug" configuration, IDEA will ask if you want to stop the current instance. However, if at some point you selected the option "Do not show this dialog in the future", it will stop and restart by default.

Is there a way to change the key functionality in Intellij based on whether the debugger is running so that I can act like F5 in Visual Studio?

Not directly. However, see the following answer ...

In the corresponding note, is there a way to make F10 and F11 (Step Over / Step Into) start debugging on the first line if the debugger is not already running, just like in Visual Studio?

If you say F5 โ€œDebug (start)โ€ and โ€œStep by stepโ€ (or one of the other steps), it will launch the debugger when it is not running, and will execute the step action when it is not running. I'm not sure why this will not work to double the initial debugging and resume; this is most likely due to how the editor handles certain actions.

You might want to consider a feature request for your desired behavior: http://youtrack.jetbrains.com

+4
source

Source: https://habr.com/ru/post/1489800/


All Articles