Is there a way to check in JUnit code if the debugger is attached to the current test execution?  

In .NET/C# i know this is possible with `Debugger.IsAttached`.

The use case would be to change or completly disable test timeouts when the debugger is attached because this is pretty annoying if you only have about 15 seconds (the defined timeout) for debugging a test.