diff --git a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs
index 388eb4dc1e..dbdda83722 100644
--- a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs
@@ -206,7 +206,7 @@ namespace ICSharpCode.SharpDevelop.Services
if (debuggedProcess.SelectedStackFrame == null || debuggedProcess.IsRunning) {
MessageService.ShowMessage(errorCannotStepNoActiveFunction, "${res:XML.MainMenu.DebugMenu.StepInto}");
} else {
- debuggedProcess.StepInto();
+ debuggedProcess.SelectedStackFrame.StepInto();
}
}
@@ -219,7 +219,7 @@ namespace ICSharpCode.SharpDevelop.Services
if (debuggedProcess.SelectedStackFrame == null || debuggedProcess.IsRunning) {
MessageService.ShowMessage(errorCannotStepNoActiveFunction, "${res:XML.MainMenu.DebugMenu.StepOver}");
} else {
- debuggedProcess.StepOver();
+ debuggedProcess.SelectedStackFrame.StepOver();
}
}
@@ -232,7 +232,7 @@ namespace ICSharpCode.SharpDevelop.Services
if (debuggedProcess.SelectedStackFrame == null || debuggedProcess.IsRunning) {
MessageService.ShowMessage(errorCannotStepNoActiveFunction, "${res:XML.MainMenu.DebugMenu.StepOut}");
} else {
- debuggedProcess.StepOut();
+ debuggedProcess.SelectedStackFrame.StepOut();
}
}
diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/Process-StateControl.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/Process-StateControl.cs
index d57ed10316..f595f1965a 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/Process-StateControl.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/Process-StateControl.cs
@@ -150,23 +150,5 @@ namespace Debugger
debugger.MTA2STA.PerformAllCalls();
}
}
-
- public void StepInto()
- {
- AssertPaused();
- SelectedStackFrame.AsyncStepInto();
- }
-
- public void StepOver()
- {
- AssertPaused();
- SelectedStackFrame.AsyncStepOver();
- }
-
- public void StepOut()
- {
- AssertPaused();
- SelectedStackFrame.AsyncStepOut();
- }
}
}
diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Process.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Process.cs
index 1a79a4ea4b..029aa9d464 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Process.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Process.cs
@@ -145,6 +145,12 @@ namespace Debugger
Pause(true);
}
+ public void Continue()
+ {
+ AsyncContinue();
+ WaitForPause();
+ }
+
public void AsyncContinue()
{
AssertPaused();
diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/StackFrame.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/StackFrame.cs
index aca58b74f6..6ebcc59414 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/StackFrame.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/StackFrame.cs
@@ -114,6 +114,27 @@ namespace Debugger
}
}
+ /// Step into next instruction
+ public void StepInto()
+ {
+ AsyncStepInto();
+ this.Process.WaitForPause();
+ }
+
+ /// Step over next instruction
+ public void StepOver()
+ {
+ AsyncStepOver();
+ this.Process.WaitForPause();
+ }
+
+ /// Step out of the stack frame
+ public void StepOut()
+ {
+ AsyncStepOut();
+ this.Process.WaitForPause();
+ }
+
/// Step into next instruction
public void AsyncStepInto()
{
diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/DebuggerTestsBase.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/DebuggerTestsBase.cs
index b1c4a274be..caa1b2d493 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/DebuggerTestsBase.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/DebuggerTestsBase.cs
@@ -69,7 +69,16 @@ namespace Debugger.Tests
}
- protected void CheckXmlOutput()
+ protected void EndTest()
+ {
+ if (!process.HasExpired) {
+ process.AsyncContinue();
+ process.WaitForExit();
+ }
+ CheckXmlOutput();
+ }
+
+ void CheckXmlOutput()
{
string startMark = "#if EXPECTED_OUTPUT\r\n";
string endMark = "#endif // EXPECTED_OUTPUT";
@@ -107,6 +116,11 @@ namespace Debugger.Tests
}
protected void StartTest(string testName)
+ {
+ StartTest(testName, true);
+ }
+
+ protected void StartTest(string testName, bool wait)
{
this.testName = testName;
string exeFilename = CompileTest(testName);
@@ -139,6 +153,10 @@ namespace Debugger.Tests
};
LogEvent("ProcessStarted", null);
+
+ if (wait) {
+ process.WaitForPause();
+ }
}
protected XmlElement LogEvent(string name, string content)
@@ -151,12 +169,6 @@ namespace Debugger.Tests
return eventNode;
}
- protected void WaitForPause()
- {
- process.WaitForPause();
- Assert.AreEqual(true, process.IsPaused);
- }
-
public void ObjectDump(object obj)
{
ObjectDump("Object", obj);
diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ArrayValue.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ArrayValue.cs
index bc3beb683f..1be2d984a6 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ArrayValue.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ArrayValue.cs
@@ -30,14 +30,12 @@ namespace Debugger.Tests {
public void ArrayValue()
{
StartTest("ArrayValue.cs");
- WaitForPause();
+
Value array = process.SelectedStackFrame.GetLocalVariableValue("array");
ObjectDump("array", array);
ObjectDump("array elements", array.GetArrayElements());
- process.AsyncContinue();
- process.WaitForExit();
- CheckXmlOutput();
+ EndTest();
}
}
}
diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Break.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Break.cs
index 8ead24c7ec..f9b3a0abdd 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Break.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Break.cs
@@ -26,11 +26,8 @@ namespace Debugger.Tests {
public void Break()
{
StartTest("Break.cs");
- WaitForPause();
- process.AsyncContinue();
- process.WaitForExit();
- CheckXmlOutput();
+ EndTest();
}
}
}
diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Breakpoint.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Breakpoint.cs
index 86ed5c083e..ab876f9c54 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Breakpoint.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Breakpoint.cs
@@ -31,21 +31,15 @@ namespace Debugger.Tests {
Breakpoint breakpoint = debugger.AddBreakpoint(@"F:\SharpDevelopTrunk\src\AddIns\Misc\Debugger\Debugger.Tests\Project\Src\TestPrograms\Breakpoint.cs", 18);
StartTest("Breakpoint.cs");
- WaitForPause();
ObjectDump(breakpoint);
-
- process.AsyncContinue();
- WaitForPause();
-
- process.AsyncContinue();
- WaitForPause();
-
+ process.Continue();
+ process.Continue();
process.AsyncContinue();
process.WaitForExit();
-
ObjectDump(breakpoint);
- CheckXmlOutput();
+
+ EndTest();
}
}
}
diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Callstack.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Callstack.cs
index 04fcd9844c..3547b6619d 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Callstack.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Callstack.cs
@@ -36,20 +36,14 @@ namespace Debugger.Tests {
public void Callstack()
{
StartTest("Callstack.cs");
- WaitForPause();
- ObjectDump("Callstack", process.SelectedThread.GetCallstack());
- process.StepOut();
- WaitForPause();
ObjectDump("Callstack", process.SelectedThread.GetCallstack());
-
- process.StepOut();
- WaitForPause();
+ process.SelectedStackFrame.StepOut();
+ ObjectDump("Callstack", process.SelectedThread.GetCallstack());
+ process.SelectedStackFrame.StepOut();
ObjectDump("Callstack", process.SelectedThread.GetCallstack());
- process.AsyncContinue();
- process.WaitForExit();
- CheckXmlOutput();
+ EndTest();
}
}
}
diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Exception.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Exception.cs
index 4cf1e16303..0e38d98832 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Exception.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Exception.cs
@@ -26,10 +26,8 @@ namespace Debugger.Tests {
public void Exception()
{
StartTest("Exception.cs");
- WaitForPause();
- process.AsyncContinue();
- process.WaitForExit();
- CheckXmlOutput();
+
+ EndTest();
}
}
}
diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ExceptionCustom.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ExceptionCustom.cs
index 2ed1da7038..3e46984733 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ExceptionCustom.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ExceptionCustom.cs
@@ -34,10 +34,8 @@ namespace Debugger.Tests {
public void ExceptionCustom()
{
StartTest("ExceptionCustom.cs");
- WaitForPause();
- process.AsyncContinue();
- process.WaitForExit();
- CheckXmlOutput();
+
+ EndTest();
}
}
}
diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Expressions.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Expressions.cs
index 9f6db4988a..1c2cb507ba 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Expressions.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Expressions.cs
@@ -57,15 +57,12 @@ namespace Debugger.Tests {
public void Expressions()
{
StartTest("Expressions.cs");
- WaitForPause();
ObjectDump("Arguments", process.SelectedStackFrame.GetArgumentValues());
ObjectDump("LocalVariables", process.SelectedStackFrame.GetLocalVariableValues());
ObjectDump("this", process.SelectedStackFrame.GetThisValue().GetMemberValues());
- process.AsyncContinue();
- process.WaitForExit();
- CheckXmlOutput();
+ EndTest();
}
}
}
diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionArgumentVariables.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionArgumentVariables.cs
index d9f8d03e4e..c257e2cbe1 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionArgumentVariables.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionArgumentVariables.cs
@@ -72,17 +72,13 @@ namespace Debugger.Tests {
public void FunctionArgumentVariables()
{
StartTest("FunctionArgumentVariables.cs");
- WaitForPause();
for(int i = 0; i < 5; i++) {
- process.AsyncContinue();
- WaitForPause();
+ process.Continue();
ObjectDump("Arguments", process.SelectedStackFrame.GetArgumentValues());
}
- process.AsyncContinue();
- process.WaitForExit();
- CheckXmlOutput();
+ EndTest();
}
}
}
diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLifetime.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLifetime.cs
index d547657d54..30b46828fe 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLifetime.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLifetime.cs
@@ -39,29 +39,24 @@ namespace Debugger.Tests {
public void FunctionLifetime()
{
StartTest("FunctionLifetime.cs");
- WaitForPause();
+
StackFrame stackFrame = process.SelectedStackFrame;
ObjectDump("SelectedStackFrame", process.SelectedStackFrame);
- process.AsyncContinue(); // Go to the SubFunction
- WaitForPause();
+ process.Continue(); // Go to the SubFunction
ObjectDump("Old StackFrame", stackFrame);
ObjectDump("SelectedStackFrame", process.SelectedStackFrame);
- process.AsyncContinue(); // Go back to Function
- WaitForPause();
+ process.Continue(); // Go back to Function
ObjectDump("Old StackFrame", stackFrame);
ObjectDump("SelectedStackFrame", process.SelectedStackFrame);
- process.AsyncContinue(); // Setp out of function
- WaitForPause();
+ process.Continue(); // Setp out of function
ObjectDump("Main", process.SelectedStackFrame);
ObjectDump("Old StackFrame", stackFrame);
ObjectDump("SelectedStackFrame", process.SelectedStackFrame);
- process.AsyncContinue();
- process.WaitForExit();
- CheckXmlOutput();
+ EndTest();
}
}
}
diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLocalVariables.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLocalVariables.cs
index feb23742de..fc258864f7 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLocalVariables.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLocalVariables.cs
@@ -31,12 +31,10 @@ namespace Debugger.Tests {
public void FunctionLocalVariables()
{
StartTest("FunctionLocalVariables.cs");
- WaitForPause();
+
ObjectDump("LocalVariables", process.SelectedStackFrame.GetLocalVariableValues());
- process.AsyncContinue();
- process.WaitForExit();
- CheckXmlOutput();
+ EndTest();
}
}
}
diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionVariablesLifetime.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionVariablesLifetime.cs
index c70ae5d66b..74f6924dee 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionVariablesLifetime.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionVariablesLifetime.cs
@@ -49,7 +49,7 @@ namespace Debugger.Tests {
Value @class = null;
StartTest("FunctionVariablesLifetime.cs"); // 1 - Enter program
- WaitForPause();
+
argument = process.SelectedStackFrame.GetArgumentValue(0);
local = process.SelectedStackFrame.GetLocalVariableValue("local");
@class = process.SelectedStackFrame.GetThisValue().GetMemberValue("class");
@@ -57,23 +57,20 @@ namespace Debugger.Tests {
ObjectDump("local", local);
ObjectDump("@class", @class);
- process.AsyncContinue(); // 2 - Go to the SubFunction
- WaitForPause();
+ process.Continue(); // 2 - Go to the SubFunction
localInSubFunction = process.SelectedStackFrame.GetLocalVariableValue("localInSubFunction");
ObjectDump("argument", argument);
ObjectDump("local", local);
ObjectDump("@class", @class);
ObjectDump("localInSubFunction", @localInSubFunction);
- process.AsyncContinue(); // 3 - Go back to Function
- WaitForPause();
+ process.Continue(); // 3 - Go back to Function
ObjectDump("argument", argument);
ObjectDump("local", local);
ObjectDump("@class", @class);
ObjectDump("localInSubFunction", @localInSubFunction);
- process.AsyncContinue(); // 4 - Go to the SubFunction
- WaitForPause();
+ process.Continue(); // 4 - Go to the SubFunction
ObjectDump("argument", argument);
ObjectDump("local", local);
ObjectDump("@class", @class);
@@ -81,16 +78,13 @@ namespace Debugger.Tests {
localInSubFunction = process.SelectedStackFrame.GetLocalVariableValue("localInSubFunction");
ObjectDump("localInSubFunction(new)", @localInSubFunction);
- process.AsyncContinue(); // 5 - Setp out of both functions
- WaitForPause();
+ process.Continue(); // 5 - Setp out of both functions
ObjectDump("argument", argument);
ObjectDump("local", local);
ObjectDump("@class", @class);
ObjectDump("localInSubFunction", @localInSubFunction);
- process.AsyncContinue();
- process.WaitForExit();
- CheckXmlOutput();
+ EndTest();
}
}
}
diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/GenericDictionary.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/GenericDictionary.cs
index 75c5be427a..0ad34a3c67 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/GenericDictionary.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/GenericDictionary.cs
@@ -31,13 +31,11 @@ namespace Debugger.Tests {
public void GenericDictionary()
{
StartTest("GenericDictionary.cs");
- WaitForPause();
+
ObjectDump("dict", process.SelectedStackFrame.GetLocalVariableValue("dict"));
ObjectDump("dict members", process.SelectedStackFrame.GetLocalVariableValue("dict").GetMemberValues(null, BindingFlags.All));
- process.AsyncContinue();
- process.WaitForExit();
- CheckXmlOutput();
+ EndTest();
}
}
}
diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Generics.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Generics.cs
index a51ad6aa2f..5262710ce1 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Generics.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Generics.cs
@@ -110,19 +110,14 @@ namespace Debugger.Tests {
StartTest("Generics.cs");
for(int i = 0; i < 8; i++) {
- WaitForPause();
ObjectDump("SelectedStackFrame", process.SelectedStackFrame);
ObjectDump("SelectedStackFrame-GetArguments", process.SelectedStackFrame.GetArgumentValues());
- process.AsyncContinue();
+ process.Continue();
}
-
- WaitForPause();
ObjectDump("Prop", process.SelectedStackFrame.GetLocalVariableValue("gClass").GetMemberValue("Prop"));
ObjectDump("StaticProp", process.SelectedStackFrame.GetLocalVariableValue("gClass").GetMemberValue("StaticProp"));
- process.AsyncContinue();
- process.WaitForExit();
- CheckXmlOutput();
+ EndTest();
}
}
}
diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/HelloWorld.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/HelloWorld.cs
index b312f2fd80..0987752fb8 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/HelloWorld.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/HelloWorld.cs
@@ -25,9 +25,11 @@ namespace Debugger.Tests {
[NUnit.Framework.Test]
public void HelloWorld()
{
- StartTest("HelloWorld.cs");
+ StartTest("HelloWorld.cs", false);
+
process.WaitForExit();
- CheckXmlOutput();
+
+ EndTest();
}
}
}
diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/MetadataIdentity.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/MetadataIdentity.cs
index 030141967a..d10fcbf587 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/MetadataIdentity.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/MetadataIdentity.cs
@@ -34,18 +34,15 @@ namespace Debugger.Tests {
public void MetadataIdentity()
{
StartTest("MetadataIdentity.cs");
- WaitForPause();
DebugType type = process.SelectedStackFrame.GetThisValue().Type;
MethodInfo mainMethod = process.SelectedStackFrame.MethodInfo;
- process.AsyncContinue();
- WaitForPause();
+ process.Continue();
Assert.AreEqual(type, process.SelectedStackFrame.GetThisValue().Type);
Assert.AreEqual(mainMethod, process.SelectedStackFrame.MethodInfo);
- process.AsyncContinue();
- process.WaitForExit();
- CheckXmlOutput();
+
+ EndTest();
}
}
}
diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ObjectValue.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ObjectValue.cs
index a50882ebdc..c9797c6c6d 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ObjectValue.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ObjectValue.cs
@@ -46,20 +46,16 @@ namespace Debugger.Tests {
Value val = null;
StartTest("ObjectValue.cs");
- WaitForPause();
+
val = process.SelectedStackFrame.GetLocalVariableValue("val");
ObjectDump("val", val);
ObjectDump("val members", val.GetMemberValues(null, Debugger.BindingFlags.All));
- //ObjectDump("typeof(val)", val.Type);
- process.AsyncContinue();
- WaitForPause();
+ process.Continue();
ObjectDump("val", val);
ObjectDump("val members", val.GetMemberValues(null, Debugger.BindingFlags.All));
- process.AsyncContinue();
- process.WaitForExit();
- CheckXmlOutput();
+ EndTest();
}
}
}
diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/SetIP.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/SetIP.cs
index 33795b21fc..8612741e54 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/SetIP.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/SetIP.cs
@@ -29,18 +29,14 @@ namespace Debugger.Tests {
public void SetIP()
{
StartTest("SetIP.cs");
- WaitForPause();
Assert.IsNotNull(process.SelectedStackFrame.CanSetIP("SetIP.cs", 16, 0));
Assert.IsNull(process.SelectedStackFrame.CanSetIP("SetIP.cs", 100, 0));
process.SelectedStackFrame.SetIP("SetIP.cs", 16, 0);
- process.AsyncContinue();
- WaitForPause();
+ process.Continue();
Assert.AreEqual("1\r\n1\r\n", log);
- process.AsyncContinue();
- process.WaitForExit();
- CheckXmlOutput();
+ EndTest();
}
}
}
diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/SimpleProgram.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/SimpleProgram.cs
index 2470fb108a..dc302d1882 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/SimpleProgram.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/SimpleProgram.cs
@@ -25,9 +25,11 @@ namespace Debugger.Tests {
[NUnit.Framework.Test]
public void SimpleProgram()
{
- StartTest("SimpleProgram.cs");
+ StartTest("SimpleProgram.cs", false);
+
process.WaitForExit();
- CheckXmlOutput();
+
+ EndTest();
}
}
}
diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/StackOverflow.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/StackOverflow.cs
index e456ea2921..19398ec8a2 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/StackOverflow.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/StackOverflow.cs
@@ -32,13 +32,11 @@ namespace Debugger.Tests {
public void StackOverflow()
{
StartTest("StackOverflow.cs");
- WaitForPause();
- process.AsyncContinue();
- WaitForPause();
+ process.Continue();
ObjectDump("LastStackFrame", process.SelectedThread.MostRecentStackFrame);
- CheckXmlOutput();
+ EndTest();
}
}
}
@@ -62,6 +60,7 @@ namespace Debugger.Tests {
Fun
Start=21,3 End=21,4
+
#endif // EXPECTED_OUTPUT
\ No newline at end of file
diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Stepping.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Stepping.cs
index 8e1b2b78fe..173733f498 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Stepping.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Stepping.cs
@@ -41,44 +41,34 @@ namespace Debugger.Tests {
public void Stepping()
{
StartTest("Stepping.cs");
- WaitForPause();
+
ObjectDumpToString("NextStatement", process.SelectedStackFrame.NextStatement);
- process.StepOver(); // Debugger.Break
- WaitForPause();
+ process.SelectedStackFrame.StepOver(); // Debugger.Break
ObjectDumpToString("NextStatement", process.SelectedStackFrame.NextStatement);
- process.StepOver(); // Debug.WriteLine 1
- WaitForPause();
+ process.SelectedStackFrame.StepOver(); // Debug.WriteLine 1
ObjectDumpToString("NextStatement", process.SelectedStackFrame.NextStatement);
- process.StepInto(); // Method Sub
- WaitForPause();
+ process.SelectedStackFrame.StepInto(); // Method Sub
ObjectDumpToString("NextStatement", process.SelectedStackFrame.NextStatement);
- process.StepInto(); // '{'
- WaitForPause();
+ process.SelectedStackFrame.StepInto(); // '{'
ObjectDumpToString("NextStatement", process.SelectedStackFrame.NextStatement);
- process.StepInto(); // Debug.WriteLine 2
- WaitForPause();
+ process.SelectedStackFrame.StepInto(); // Debug.WriteLine 2
ObjectDumpToString("NextStatement", process.SelectedStackFrame.NextStatement);
- process.StepOut(); // Method Sub
- WaitForPause();
+ process.SelectedStackFrame.StepOut(); // Method Sub
ObjectDumpToString("NextStatement", process.SelectedStackFrame.NextStatement);
- process.StepOver(); // Method Sub
- WaitForPause();
+ process.SelectedStackFrame.StepOver(); // Method Sub
ObjectDumpToString("NextStatement", process.SelectedStackFrame.NextStatement);
- process.StepOver(); // Method Sub2
- WaitForPause();
+ process.SelectedStackFrame.StepOver(); // Method Sub2
ObjectDumpToString("NextStatement", process.SelectedStackFrame.NextStatement);
- process.AsyncContinue();
- process.WaitForExit();
- CheckXmlOutput();
+ EndTest();
}
}
}
diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ValueType.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ValueType.cs
index dcfa5add61..52fd4e113f 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ValueType.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ValueType.cs
@@ -35,12 +35,10 @@ namespace Debugger.Tests {
"DebugType.BaseType"
);
StartTest("ValueType.cs");
- WaitForPause();
ObjectDump("this", process.SelectedStackFrame.GetThisValue());
- process.AsyncContinue();
- process.WaitForExit();
- CheckXmlOutput();
+
+ EndTest();
}
}
}
diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/_Template.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/_Template.cs
index bb8a105c97..735c9e8300 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/_Template.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/_Template.cs
@@ -26,11 +26,8 @@ namespace Debugger.Tests {
public void Template()
{
StartTest("_Template.cs");
- WaitForPause();
- process.AsyncContinue();
- process.WaitForExit();
- CheckXmlOutput();
+ EndTest();
}
}
}