5

I've found several posts with instructions of how to kill java thread with jdb http://www.rhcedan.com/2010/06/22/killing-a-java-thread/ or on SO. This works. Now I want to kill thread with Intellij-IDEA debugger. Is it possible to do?

1
  • Execute System.exit(0). Commented Jan 29, 2020 at 12:29

2 Answers 2

7

There is a little icon on the right side of the Debug view:

Threads icon

This will open 'Threads' tab and there you can right-click on some of them and select 'Interrupt' (and press F9 if you are sleeping on some breakpoint).

Sign up to request clarification or add additional context in comments.

1 Comment

In order to have the possibility of Interrupt thread you have to: right click on threads -> Customize Threads View -> check Show method arguments types
2

The accepted answer is now outdated (at least it is different for me in IntelliJ 2022.3.2). Just in case anyone (like me) stumbles upon it, there is a button at the right side of the debugger that allows you to show threads (it is disabled by default). see image below: enter image description here

Then you'll be able to select the thread you want to modify through the debugger by right clicking it.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.