From a28bf2afc5e7745723da422e3fd3f43d549628eb Mon Sep 17 00:00:00 2001 From: "Egor.Ushakov" Date: Tue, 15 Sep 2015 13:17:53 +0300 Subject: [PATCH] preparing to enable multithreaded test --- .../src/com/intellij/debugger/DebuggerTestCase.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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