diff --git a/java/testFramework/src/com/intellij/debugger/DebuggerTestCase.java b/java/testFramework/src/com/intellij/debugger/DebuggerTestCase.java index 3aa8106ee282..f39ce8f84167 100644 --- a/java/testFramework/src/com/intellij/debugger/DebuggerTestCase.java +++ b/java/testFramework/src/com/intellij/debugger/DebuggerTestCase.java @@ -61,6 +61,7 @@ import com.intellij.xdebugger.XDebugProcess; import com.intellij.xdebugger.XDebugProcessStarter; import com.intellij.xdebugger.XDebugSession; import com.intellij.xdebugger.XDebuggerManager; +import com.sun.jdi.Location; import org.jdom.Element; import org.jetbrains.annotations.NotNull; @@ -421,6 +422,17 @@ public abstract class DebuggerTestCase extends ExecutionWithDebuggerToolsTestCas return createDebuggerContext(suspendContext, suspendContext.getFrameProxy()); } + protected void printLocation(SuspendContextImpl suspendContext) { + try { + Location location = suspendContext.getFrameProxy().location(); + String message = "paused at " + location.sourcePath() + ":" + location.lineNumber(); + println(message, ProcessOutputTypes.SYSTEM); + } + catch (Throwable e) { + addException(e); + } + } + protected void createBreakpointInHelloWorld() { DebuggerInvocationUtil.invokeAndWait(myProject, new Runnable() { @Override