Java – How to Debug Task?

I have a long running Task in my project that I am having a hard time debugging. As I understand it, the Task will never throw an exception, nor allow any of the code within it to do so.

While testing the application, I am running into many situations where the execution just hangs, no errors, no warnings, nothing.

Now, I have been able to catch Throwable instead to see what is causing the problem, but this seems like a poor idea and is creating a lot more work than necessary.

So my question is, as an amateur programmer, how should I go about debugging the code in my Task when I can’t see exceptions?