DebugBreak equivalent in Java?
问题 I'm looking for a way to break into the debugger from Java code, without setting a breakpoint in the IDE. In Win32 there was DebugBreak() , in C# there's DebugBreak() Equivalent in C#, but I can't find anything in Java. What I'm trying to do: say I have a wait with a 30s timeout, but in normal conditions that wait should always be <1s. I'd like to use ByteMan or something similar to wait with 1s timeout first, and break into the debugger if that wait timed out. 回答1: Not a direct answer to