Disconnect from a remote JVM in IntelliJ Idea - intellij-idea

I have connected IntelliJ to a remote JVM, and would now like to disconnect from the remote JVM without the remote JVM stopping. In Eclipse there are two buttons that explicitly stop the JVM or disconnect from the JVM, but the buttons on the debug windows in IntelliJ aren't clear. The tooltips and the online help aren't much help.
Stop (red square) - "Click this button to terminate the current process externally by means of the standard shutdown script."
Close (red X) - "Click this button to close the selected tab of the Run tool window and terminate the current process."
Rerun (green arrow around a grey square) - "Click this button to stop the current application and run it again"
I'm pretty sure it's the Stop button, but none of them makes it clear what will happen to the remote JVM.
Which button should I press to safely end the debugging session without killing the remote JVM?

Press the big red stop button (debug panel, on the left). It'll stop the debugger, not the remote process. I don't think you can use the debugger to explicitly kill the remote process -- you're only connected to the debug port and I don't think it can do things like that, unless you deliberately execute a System.exit(0) command in one of the code evaluation windows.

In my case I was looking for the red stop button which was not visible. But I found it on the left side of the debug window when hoovering over a blank section. Perhaps a bug since I am using color scheme Darcula?
Ctrl-F2 also works.

Related

Halt code at dialog (msgbox()) command in IDE

Title quite much says it all.
In VB6, and in VBA/Access it was possible to hit break key, and jump into debug mode when using the msgbox() command.
Is there a way to do this in vb.net (desktop/winforms) applications?
Often, some code will toss up a dialog box, and it is rather nice then to jump into debug mode as a result of that message box having been displayed.
Edit
Ok, hitting pause button in most applications work, but in this application, when I hit pause, then I get this:
Edit two:
Ok, I have discovered the reason for this behavior. I have the application Frame work box un-checked. The reason for this is I did't want to specify the main application form as startup form, and I desired additional control over what occurs if the main startup form (that I don't specify) is closed. Thus, my main application form is launched via application.Run(my form)
It thus seems that due to starting the main form as a new separate application thread (which is the result of using application.Run(), then you can't use ctrl-break, or more common use/hit the pause button in the IDE to halt the code. Hitting pause will thus display that the application is running a main app thread, which indeed is the case since I use applicaiton.Run() to launch the main form from the classic and traditional Sub Main().
Edit 3
A way to fix this, and enable the pause key to work is to un-check in tools->debugging the [ ] Enable Just My Code. This will thus allow debug mode of the other "main" application thread.
Hmm. [CTRL][BREAK] clears the dialog box. However, clicking the pause button in the IDE will do what you want.
Alternatively, select Debug > Break All from the menu.

WSL terminal forgets to update and loses focus

I'm trying to use the WSL console in Windows 10 (version 1909) for some development work, but I find that often running processes will simply appear to have hung, but when I send a keystroke to the terminal it will update back to the bash terminal (as if had completed all along but hadn't updated).
I am running the latest version of the debian package from the store.
Is there anyway to make this problem go away or am I wasting my time trying to use the default terminal?
Just a hunch, but I am guessing you are ending up in select mode. If you click anywhere in the terminal the title of the window will change to be prefixed with "select" and the terminal output will freeze so that you can select text without it changing while you try to highlight it. Pressing any key will cause you to exit select mode.
If this bothers you you can turn it off by right clicking on the title bar, clicking properties, and disabling quick-edit mode. Alternately, might I recommend the new Windows terminal, which handles selection and the clipboard in a more intuitive way.

How to open a Keyboard on focus on text input?

In iOS simulator I can toggle software keyboard (⌘K) manually under Hardware main menu, and then tests pass. And I have to do it after Hardware Restart each time. But how can we make detox always open soft keyboard when an input field receives focus? Once soft keyboard is enabled it will stay enabled until next hardware restart, but tests will fail otherwise (soft keyboard won't show up on text input focus)
We've recently changed the way we do typing in Detox. Starting with Detox 13, it is no longer necessary to disconnect the hardware keyboard and show the software keyboard. Please upgrade your Detox and you should see this new behavior immediately.
Try MAYUS+CMD+K instead of CMD+K

Toggle between embedded terminal and editor while keep the terminal open

I have IntelliJ IDEA 2016.3.2 on OSX.
I understand ⌥F12 allows us to toggle between embedded terminal and editor, but in this way the terminal disappears when focus moves to editor. Sometimes I'd like to switch focus from and to terminal with shortcut keys and still have the terminal opened so that I can tail logs.
My current workaround is to use both Terminal.app and IntelliJ IDEA and switch over by ⌘+Tab, but to me it's handy if I can do both in IntelliJ IDEA. Probably the embedded terminal and its use cases are designed to suite lightweight task that requires minimal attention, though.
Your problem here is that the ⌥+F12 shortcut isn't toggle focus, but toggle open. So essentially you are just opening and closing it.
After opening the terminal you should use the same command you use to switch between tabs in the editor (I believe it's ⌘+` on OSX).
Your window mode is correct though - docked mode keeps it attached to the side/bottom of the window, and pinned mode keeps it from collapsing when losing focus, so keep those set.

IntelliJ Debug tool window switches from Console to Debugger

This will probably sound like a minor issue, but it's completely messing up my workflow:
I have a microservice that I restart frequently to refresh changes. I start in Debug mode, and use the curvy arrow in the upper left of the Debug tool window to stop/start the process.
In the Debug window, there are 2 tabs, Debugger and Console. For weeks, I've kept this on Console, and I can see the service run through startup, and I know when to start hitting endpoints. All of a sudden, whenever I start up, it switches to the Debugger tab, which means I have to manually switch back.
No documentation on this, and didn't find anything with a Google search. Does anyone have something to try?
Thank you
Update:
I start with the focus on Console (the right tab) and it switches to Debugger (the left tab). There is a "Focus on startup" in the context menu for Console, but it has no effect.
I'm not sure this is exactly what you're looking for. If it's not, could you please add some screenshots to the question which might better illustrate the problem? But if it is, here is what I found:
In the Debug tool window you have tabs like Output and Variables, which are probably the tabs you are talking about. You can right click any of these tabs and select Focus On Startup. You probably have this option selected for the wrong tab. So try selecting it for the Output tab.
You can toggle the Focus On Startup behavior for other tabs in the Debug tool window too.