0

My Java application has a problem I'm struggling to solve. I need to breakpoint runWorker() method of ThreadPoolExecutor , but because this is a standard Java class I dont think I can add breakpoints to stop it when I run in my IntelliJ Java tool.

I could view the source in IntelliJ and set a breakpoint but unlike breakpoints in my own code it had no effect.

What is the right approach here ?

4
  • 1
    Is it ThreadExecutorPool or ThreadPoolExecutor ? Commented Jul 10, 2019 at 12:52
  • @c0der sorry its ThreadPoolExecutor, corrected question Commented Jul 10, 2019 at 12:55
  • 1
    Adding a breakpoint to the ThreadPoolExecutor#runWorker(Worker) method worked for me using IntelliJ; execution was suspended and was able to step though the code. Commented Jul 10, 2019 at 13:14
  • @Slaw thats for confirming it should work, the problem was the attached src was for Java 1.8.1 but I was running as Java 10, when I changed to run as java 1.8.1 it worked. Commented Jul 10, 2019 at 13:47

1 Answer 1

1

The problem was the attached src was for Java 1.8.1 but I was running as Java 10, when I changed to run as java 1.8.1 it worked.

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.