Browse Source

Added synchronous Continue and Step*.

Use these to simplify the test code.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2888 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 18 years ago
parent
commit
ec2863a837
  1. 6
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs
  2. 18
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/Process-StateControl.cs
  3. 6
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Process.cs
  4. 21
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/StackFrame.cs
  5. 26
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/DebuggerTestsBase.cs
  6. 6
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ArrayValue.cs
  7. 5
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Break.cs
  8. 14
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Breakpoint.cs
  9. 14
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Callstack.cs
  10. 6
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Exception.cs
  11. 6
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ExceptionCustom.cs
  12. 5
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Expressions.cs
  13. 8
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionArgumentVariables.cs
  14. 15
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLifetime.cs
  15. 6
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLocalVariables.cs
  16. 18
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionVariablesLifetime.cs
  17. 6
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/GenericDictionary.cs
  18. 9
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Generics.cs
  19. 6
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/HelloWorld.cs
  20. 9
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/MetadataIdentity.cs
  21. 10
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ObjectValue.cs
  22. 8
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/SetIP.cs
  23. 6
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/SimpleProgram.cs
  24. 7
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/StackOverflow.cs
  25. 30
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Stepping.cs
  26. 6
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ValueType.cs
  27. 5
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/_Template.cs

6
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs

@ -206,7 +206,7 @@ namespace ICSharpCode.SharpDevelop.Services @@ -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 @@ -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 @@ -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();
}
}

18
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/Process-StateControl.cs

@ -150,23 +150,5 @@ namespace Debugger @@ -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();
}
}
}

6
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Process.cs

@ -145,6 +145,12 @@ namespace Debugger @@ -145,6 +145,12 @@ namespace Debugger
Pause(true);
}
public void Continue()
{
AsyncContinue();
WaitForPause();
}
public void AsyncContinue()
{
AssertPaused();

21
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/StackFrame.cs

@ -114,6 +114,27 @@ namespace Debugger @@ -114,6 +114,27 @@ namespace Debugger
}
}
/// <summary> Step into next instruction </summary>
public void StepInto()
{
AsyncStepInto();
this.Process.WaitForPause();
}
/// <summary> Step over next instruction </summary>
public void StepOver()
{
AsyncStepOver();
this.Process.WaitForPause();
}
/// <summary> Step out of the stack frame </summary>
public void StepOut()
{
AsyncStepOut();
this.Process.WaitForPause();
}
/// <summary> Step into next instruction </summary>
public void AsyncStepInto()
{

26
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/DebuggerTestsBase.cs

@ -69,7 +69,16 @@ namespace Debugger.Tests @@ -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 @@ -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 @@ -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 @@ -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);

6
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ArrayValue.cs

@ -30,14 +30,12 @@ namespace Debugger.Tests { @@ -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();
}
}
}

5
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Break.cs

@ -26,11 +26,8 @@ namespace Debugger.Tests { @@ -26,11 +26,8 @@ namespace Debugger.Tests {
public void Break()
{
StartTest("Break.cs");
WaitForPause();
process.AsyncContinue();
process.WaitForExit();
CheckXmlOutput();
EndTest();
}
}
}

14
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Breakpoint.cs

@ -31,21 +31,15 @@ namespace Debugger.Tests { @@ -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();
}
}
}

14
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Callstack.cs

@ -36,20 +36,14 @@ namespace Debugger.Tests { @@ -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();
}
}
}

6
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Exception.cs

@ -26,10 +26,8 @@ namespace Debugger.Tests { @@ -26,10 +26,8 @@ namespace Debugger.Tests {
public void Exception()
{
StartTest("Exception.cs");
WaitForPause();
process.AsyncContinue();
process.WaitForExit();
CheckXmlOutput();
EndTest();
}
}
}

6
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ExceptionCustom.cs

@ -34,10 +34,8 @@ namespace Debugger.Tests { @@ -34,10 +34,8 @@ namespace Debugger.Tests {
public void ExceptionCustom()
{
StartTest("ExceptionCustom.cs");
WaitForPause();
process.AsyncContinue();
process.WaitForExit();
CheckXmlOutput();
EndTest();
}
}
}

5
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Expressions.cs

@ -57,15 +57,12 @@ namespace Debugger.Tests { @@ -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();
}
}
}

8
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionArgumentVariables.cs

@ -72,17 +72,13 @@ namespace Debugger.Tests { @@ -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();
}
}
}

15
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLifetime.cs

@ -39,29 +39,24 @@ namespace Debugger.Tests { @@ -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();
}
}
}

6
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionLocalVariables.cs

@ -31,12 +31,10 @@ namespace Debugger.Tests { @@ -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();
}
}
}

18
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/FunctionVariablesLifetime.cs

@ -49,7 +49,7 @@ namespace Debugger.Tests { @@ -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 { @@ -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 { @@ -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();
}
}
}

6
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/GenericDictionary.cs

@ -31,13 +31,11 @@ namespace Debugger.Tests { @@ -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();
}
}
}

9
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Generics.cs

@ -110,19 +110,14 @@ namespace Debugger.Tests { @@ -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();
}
}
}

6
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/HelloWorld.cs

@ -25,9 +25,11 @@ namespace Debugger.Tests { @@ -25,9 +25,11 @@ namespace Debugger.Tests {
[NUnit.Framework.Test]
public void HelloWorld()
{
StartTest("HelloWorld.cs");
StartTest("HelloWorld.cs", false);
process.WaitForExit();
CheckXmlOutput();
EndTest();
}
}
}

9
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/MetadataIdentity.cs

@ -34,18 +34,15 @@ namespace Debugger.Tests { @@ -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();
}
}
}

10
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ObjectValue.cs

@ -46,20 +46,16 @@ namespace Debugger.Tests { @@ -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();
}
}
}

8
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/SetIP.cs

@ -29,18 +29,14 @@ namespace Debugger.Tests { @@ -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();
}
}
}

6
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/SimpleProgram.cs

@ -25,9 +25,11 @@ namespace Debugger.Tests { @@ -25,9 +25,11 @@ namespace Debugger.Tests {
[NUnit.Framework.Test]
public void SimpleProgram()
{
StartTest("SimpleProgram.cs");
StartTest("SimpleProgram.cs", false);
process.WaitForExit();
CheckXmlOutput();
EndTest();
}
}
}

7
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/StackOverflow.cs

@ -32,13 +32,11 @@ namespace Debugger.Tests { @@ -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 { @@ -62,6 +60,7 @@ namespace Debugger.Tests {
<MethodInfo>Fun</MethodInfo>
<NextStatement>Start=21,3 End=21,4</NextStatement>
</LastStackFrame>
<ProcessExited />
</Test>
</DebuggerTests>
#endif // EXPECTED_OUTPUT

30
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/Stepping.cs

@ -41,44 +41,34 @@ namespace Debugger.Tests { @@ -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();
}
}
}

6
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/ValueType.cs

@ -35,12 +35,10 @@ namespace Debugger.Tests { @@ -35,12 +35,10 @@ namespace Debugger.Tests {
"DebugType.BaseType"
);
StartTest("ValueType.cs");
WaitForPause();
ObjectDump("this", process.SelectedStackFrame.GetThisValue());
process.AsyncContinue();
process.WaitForExit();
CheckXmlOutput();
EndTest();
}
}
}

5
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/_Template.cs

@ -26,11 +26,8 @@ namespace Debugger.Tests { @@ -26,11 +26,8 @@ namespace Debugger.Tests {
public void Template()
{
StartTest("_Template.cs");
WaitForPause();
process.AsyncContinue();
process.WaitForExit();
CheckXmlOutput();
EndTest();
}
}
}

Loading…
Cancel
Save