Fix step-in and step-over code.
authorMikhail Kurinnoi <m.kurinnoi@samsung.com>
Mon, 15 Jan 2024 12:27:53 +0000 (15:27 +0300)
committerGleb Balykov/Advanced System SW Lab /SRR/Staff Engineer/Samsung Electronics <g.balykov@samsung.com>
Wed, 24 Jan 2024 15:10:10 +0000 (18:10 +0300)
* Fix step-in and step-over in "filtered" methods after stop at breakpoint.
* Fix step-in fome method arguments that also contains methods.
* Fix step-in in case disabled Just My Code, and method have DebuggerStepThrough or DebuggerHidden attribute.

Related to https://github.com/Samsung/netcoredbg/issues/154

src/debugger/steppers.cpp
test-suite/MITestAsyncStepping/Program.cs
test-suite/MITestHotReloadAsyncStepping/Program.cs
test-suite/MITestHotReloadStepping/Program.cs
test-suite/MITestNoJMCAsyncStepping/Program.cs
test-suite/MITestNoJMCNoFilterStepping/Program.cs
test-suite/MITestStepping/Program.cs
test-suite/VSCodeTestAsyncStepping/Program.cs
test-suite/VSCodeTestNoJMCAsyncStepping/Program.cs
test-suite/VSCodeTestNoJMCNoFilterStepping/Program.cs
test-suite/VSCodeTestStepping/Program.cs

index 6a2939a8810d1491587f397f06373b541cfd973c..6395c8e7d0c746a7a7a37bb273331e575db39a17 100644 (file)
@@ -121,6 +121,11 @@ HRESULT Steppers::ManagedCallbackStepComplete(ICorDebugThread *pThread, CorDebug
 \r
     auto methodShouldBeFltered = [&]() -> bool\r
     {\r
+        // In case stepping by method code lines or return to caller, don't check filtering (don't need to):\r
+        // 1) filtering check for this method was already "passed" or 2) execution was stopped at breakpoint inside method or its callee.\r
+        if (reason != CorDebugStepReason::STEP_CALL)\r
+            return false;\r
+\r
         ULONG nameLen;\r
         WCHAR szFunctionName[mdNameLen] = {0};\r
         if (SUCCEEDED(iMD->GetMethodProps(methodDef, nullptr, szFunctionName, _countof(szFunctionName),\r
@@ -170,8 +175,8 @@ HRESULT Steppers::ManagedCallbackStepComplete(ICorDebugThread *pThread, CorDebug
     bool noUserCodeFound = false; // Must be initialized with `false`, since GetFrameILAndNextUserCodeILOffset call could be failed before delegate call.\r
     if (SUCCEEDED(Status = m_sharedModules->GetFrameILAndNextUserCodeILOffset(iCorFrame, ipOffset, ilNextUserCodeOffset, &noUserCodeFound)))\r
     {\r
-        // Current IL offset less than IL offset of next close user code line.\r
-        if (ipOffset < ilNextUserCodeOffset)\r
+        // Current IL offset less than IL offset of next close user code line (for example, step-in into async method)\r
+        if (reason == CorDebugStepReason::STEP_CALL && ipOffset < ilNextUserCodeOffset)\r
         {\r
             IfFailRet(m_simpleStepper->SetupStep(pThread, IDebugger::StepType::STEP_OVER));\r
             return S_OK;\r
@@ -202,8 +207,7 @@ HRESULT Steppers::ManagedCallbackStepComplete(ICorDebugThread *pThread, CorDebug
         {\r
             IfFailRet(m_simpleStepper->SetupStep(pThread, IDebugger::StepType::STEP_IN));\r
             // In case step-in will return from filtered method and no user code was called, step-in again.\r
-            if (!m_stepFiltering && methodShouldBeFltered())\r
-                 m_filteredPrevStep = true;\r
+            m_filteredPrevStep = true;\r
 \r
             return S_OK;\r
         }\r
index e86c811de11797ea2429d38dbeeae7c5c4950ce1..2b79a93612e7ae101a14be846e888d92876dcfef 100644 (file)
@@ -271,6 +271,9 @@ namespace MITestAsyncStepping
 
             Label.Checkpoint("step_out_func1_check", "step_in_func4", (Object context) => {
                 Context Context = (Context)context;
+                Context.WasStep(@"__FILE__:__LINE__", "step_func1");
+                Context.StepOver(@"__FILE__:__LINE__");
+
                 Context.WasStep(@"__FILE__:__LINE__", "step_func4");
                 Context.StepIn(@"__FILE__:__LINE__");
             });
@@ -280,6 +283,9 @@ namespace MITestAsyncStepping
 
             Label.Checkpoint("step_out_func4_check", "step_in_func2", (Object context) => {
                 Context Context = (Context)context;
+                Context.WasStep(@"__FILE__:__LINE__", "step_func4");
+                Context.StepOver(@"__FILE__:__LINE__");
+
                 Context.WasStep(@"__FILE__:__LINE__", "step_func2");
                 Context.StepIn(@"__FILE__:__LINE__");
             });
@@ -289,6 +295,9 @@ namespace MITestAsyncStepping
 
             Label.Checkpoint("step_out_func2_check", "step_in_func3_cycle1", (Object context) => {
                 Context Context = (Context)context;
+                Context.WasStep(@"__FILE__:__LINE__", "step_func2");
+                Context.StepOver(@"__FILE__:__LINE__");
+
                 Context.WasStep(@"__FILE__:__LINE__", "step_func3_cycle1");
                 Context.StepIn(@"__FILE__:__LINE__");
             });
@@ -299,6 +308,9 @@ namespace MITestAsyncStepping
 
             Label.Checkpoint("step_out_func3_check_cycle1", "step_in_func3_cycle2", (Object context) => {
                 Context Context = (Context)context;
+                Context.WasStep(@"__FILE__:__LINE__", "step_func3_cycle1");
+                Context.StepOver(@"__FILE__:__LINE__");
+
                 Context.WasStep(@"__FILE__:__LINE__", "step_func3_cycle2");
                 Context.StepIn(@"__FILE__:__LINE__");
             });
@@ -311,6 +323,9 @@ namespace MITestAsyncStepping
 
             Label.Checkpoint("step_whenall", "test_attr1", (Object context) => {
                 Context Context = (Context)context;
+                Context.WasStep(@"__FILE__:__LINE__", "step_func3_cycle2");
+                Context.StepOver(@"__FILE__:__LINE__");
+
                 Context.WasStep(@"__FILE__:__LINE__", "step_whenall_1");
                 Context.StepOver(@"__FILE__:__LINE__");
                 Context.WasStep(@"__FILE__:__LINE__", "step_whenall_2");
index b53b664ffef376edad29b18490cc53e1b1d5d9dc..1ae6d62197375c7e8627d1a2e4846c14b842dbd2 100644 (file)
@@ -392,7 +392,7 @@ namespace MITestHotReloadAsyncStepping
                 Context Context = (Context)context;\r
 \r
                 Context.StepOut(@"__FILE__:__LINE__");\r
-                Context.WasStep(@"__FILE__:__LINE__", 16);\r
+                Context.WasStep(@"__FILE__:__LINE__", 15);\r
 \r
                 Context.Continue(@"__FILE__:__LINE__");\r
             });\r
index 1e0f2e5865362a83cbb035a90e39bdfb0f5f7b68..507a26232c1a499a9a9291c5644d8d2e7b45cdcb 100644 (file)
@@ -474,7 +474,7 @@ namespace MITestHotReloadStepping
                 Context Context = (Context)context;\r
 \r
                 Context.StepOut(@"__FILE__:__LINE__");\r
-                Context.WasStep(@"__FILE__:__LINE__", 16);\r
+                Context.WasStep(@"__FILE__:__LINE__", 15);\r
 \r
                 Context.Continue(@"__FILE__:__LINE__");\r
             });\r
index 926c7fe00d2e89d7214d48f7013d8bd12e1b3621..5b67cdd7b37606cd41d232072570c4757e97f02e 100644 (file)
@@ -246,6 +246,8 @@ namespace MITestNoJMCAsyncStepping
                 Context.StepIn(@"__FILE__:__LINE__");\r
                 Context.WasStep(@"__FILE__:__LINE__", "test_attr_func2_in");\r
                 Context.StepOut(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func2");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
                 Context.WasStep(@"__FILE__:__LINE__", "test_attr_func3");\r
                 Context.StepIn(@"__FILE__:__LINE__");\r
             });\r
@@ -264,6 +266,8 @@ namespace MITestNoJMCAsyncStepping
                 Context.StepIn(@"__FILE__:__LINE__");\r
                 Context.WasStep(@"__FILE__:__LINE__", "test_attr_class2_func_in");\r
                 Context.StepOut(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_class2_func");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
                 Context.WasStep(@"__FILE__:__LINE__", "test_attr_end");\r
 \r
                 Context.EnableBreakpoint(@"__FILE__:__LINE__", "test_async_void1");\r
index 689dc783867fa61879729603a1262409e5a6cc2d..34bc1f73287040b10a5e83484499a617843ddcfd 100644 (file)
@@ -172,6 +172,95 @@ namespace NetcoreDbgTest.Script
 \r
 namespace MITestNoJMCNoFilterStepping\r
 {\r
+    public readonly struct Digit\r
+    {\r
+        private readonly byte digit;\r
+\r
+        public Digit(byte digit)\r
+        {\r
+            this.digit = digit;\r
+        }\r
+        public static implicit operator byte(Digit d)\r
+        {                                                       Label.Breakpoint("test_op_implicit_1");\r
+            return d.digit;                                     Label.Breakpoint("test_op_implicit_2");\r
+        Label.Breakpoint("test_op_implicit_3");}\r
+        public static explicit operator Digit(byte b)\r
+        {                                                       Label.Breakpoint("test_op_explicit_1");\r
+            return new Digit(b);                                Label.Breakpoint("test_op_explicit_2");\r
+        Label.Breakpoint("test_op_explicit_3");}\r
+    }\r
+\r
+    public class TestBreakpointInProperty\r
+    {\r
+        private int _value = 7;\r
+\r
+        private int AddOne(int data)\r
+        {                                                       Label.Breakpoint("test_break_property_getter_1");\r
+            return data + 1;                                    Label.Breakpoint("test_break_property_getter_2");\r
+        Label.Breakpoint("test_break_property_getter_3");}\r
+\r
+        public int Data\r
+        {\r
+            [DebuggerStepThrough]\r
+            get\r
+            {\r
+                int tmp = AddOne(_value);\r
+                return tmp;\r
+            }\r
+            [DebuggerStepThrough]\r
+            set\r
+            {\r
+                _value = value;\r
+            }\r
+        }\r
+    }\r
+\r
+    class TestStepInArguments\r
+    {\r
+        public int P1\r
+        {\r
+            get\r
+            {                                                               Label.Breakpoint("test_step_arguments_P1_1");\r
+                return 1;                                                   Label.Breakpoint("test_step_arguments_P1_2");\r
+            Label.Breakpoint("test_step_arguments_P1_3");}\r
+        }\r
+        public int P2\r
+        {\r
+            get\r
+            {                                                               Label.Breakpoint("test_step_arguments_P2_1");\r
+                return 1;                                                   Label.Breakpoint("test_step_arguments_P2_2");\r
+            Label.Breakpoint("test_step_arguments_P2_3");}\r
+        }\r
+        \r
+        public int M1()\r
+        {                                                                   Label.Breakpoint("test_step_arguments_M1_1");\r
+            return 1;                                                       Label.Breakpoint("test_step_arguments_M1_2");\r
+        Label.Breakpoint("test_step_arguments_M1_3");}\r
+        public int M2()\r
+        {                                                                   Label.Breakpoint("test_step_arguments_M2_1");\r
+            return 2;                                                       Label.Breakpoint("test_step_arguments_M2_2");\r
+        Label.Breakpoint("test_step_arguments_M2_3");}\r
+\r
+        public void M3(int a, int b)\r
+        {                                                                   Label.Breakpoint("test_step_arguments_M3_1");\r
+            ;                                                               Label.Breakpoint("test_step_arguments_M3_2");\r
+        Label.Breakpoint("test_step_arguments_M3_3");}\r
+        public void M4(int a, int b, int c = 0, int d = 0)\r
+        {                                                                   Label.Breakpoint("test_step_arguments_M4_1");\r
+            ;                                                               Label.Breakpoint("test_step_arguments_M4_2");\r
+        Label.Breakpoint("test_step_arguments_M4_3");}\r
+        public int M5(int k)\r
+        {                                                                   Label.Breakpoint("test_step_arguments_M5_1");\r
+            return k + 1;                                                   Label.Breakpoint("test_step_arguments_M5_2");\r
+        Label.Breakpoint("test_step_arguments_M5_3");}\r
+\r
+        [DebuggerStepThrough]\r
+        public int M6()\r
+        {\r
+            return 1;\r
+        }\r
+    }\r
+\r
     class Program\r
     {\r
         static void Main(string[] args)\r
@@ -185,29 +274,44 @@ namespace MITestNoJMCNoFilterStepping
 \r
             // Test debugger attribute on methods with JMC disabled.\r
 \r
-            test_attr_func1();                                              Label.Breakpoint("test_attr_func1");\r
+            test_attr_func1_1();                                            Label.Breakpoint("test_attr_func1_1");\r
+            test_attr_func1_2();                                            Label.Breakpoint("test_attr_func1_2");\r
 \r
             Label.Checkpoint("test_attr1", "test_attr2", (Object context) => {\r
                 Context Context = (Context)context;\r
-                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func1");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func1_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func1_2");\r
                 Context.StepIn(@"__FILE__:__LINE__");\r
             });\r
 \r
-            test_attr_func2();                                              Label.Breakpoint("test_attr_func2");\r
+            test_attr_func2_1();                                            Label.Breakpoint("test_attr_func2_1");\r
+            test_attr_func2_2();                                            Label.Breakpoint("test_attr_func2_2");\r
 \r
             Label.Checkpoint("test_attr2", "test_attr3", (Object context) => {\r
                 Context Context = (Context)context;\r
-                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func2");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func2_1");\r
                 Context.StepIn(@"__FILE__:__LINE__");\r
-                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func2_in");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func2_1_in");\r
                 Context.StepOut(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func2_1");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func2_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func2_2_in");\r
+                Context.StepOut(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func2_2");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
             });\r
 \r
-            test_attr_func3();                                              Label.Breakpoint("test_attr_func3");\r
+            test_attr_func3_1();                                            Label.Breakpoint("test_attr_func3_1");\r
+            test_attr_func3_2();                                            Label.Breakpoint("test_attr_func3_2");\r
 \r
             Label.Checkpoint("test_attr3", "test_attr4", (Object context) => {\r
                 Context Context = (Context)context;\r
-                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func3");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func3_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func3_2");\r
                 Context.StepIn(@"__FILE__:__LINE__");\r
             });\r
 \r
@@ -237,6 +341,9 @@ namespace MITestNoJMCNoFilterStepping
 \r
             Label.Checkpoint("test_property_attr1", "test_property_attr2", (Object context) => {\r
                 Context Context = (Context)context;\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_class2_func");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
+\r
                 Context.WasStep(@"__FILE__:__LINE__", "test_property1");\r
                 Context.StepIn(@"__FILE__:__LINE__");\r
             });\r
@@ -282,7 +389,7 @@ namespace MITestNoJMCNoFilterStepping
             res = TestImplHolder.getImpl2().Calc1();                        Label.Breakpoint("test_step_through2");\r
             Console.WriteLine("Test step through end.");                    Label.Breakpoint("test_step_through_end");\r
 \r
-            Label.Checkpoint("test_step_through", "finish", (Object context) => {\r
+            Label.Checkpoint("test_step_through", "test_step_cast", (Object context) => {\r
                 Context Context = (Context)context;\r
                 Context.WasStep(@"__FILE__:__LINE__", "test_step_through1");\r
                 Context.StepIn(@"__FILE__:__LINE__");\r
@@ -292,6 +399,8 @@ namespace MITestNoJMCNoFilterStepping
                 Context.StepIn(@"__FILE__:__LINE__");\r
                 Context.WasStep(@"__FILE__:__LINE__", "test_step_through_Calc1");\r
                 Context.StepOut(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_through1");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
 \r
                 Context.WasStep(@"__FILE__:__LINE__", "test_step_through2");\r
                 Context.StepIn(@"__FILE__:__LINE__");\r
@@ -301,8 +410,214 @@ namespace MITestNoJMCNoFilterStepping
                 Context.StepIn(@"__FILE__:__LINE__");\r
                 Context.WasStep(@"__FILE__:__LINE__", "test_step_through_Calc1");\r
                 Context.StepOut(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_through2");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
 \r
                 Context.WasStep(@"__FILE__:__LINE__", "test_step_through_end");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
+            });\r
+\r
+            // Test steps for casts.\r
+\r
+            var d = new Digit(100);                                         Label.Breakpoint("test_step_cast1");\r
+            byte byte_var = d;                                              Label.Breakpoint("test_step_cast2");\r
+            Digit digit_var = (Digit)byte_var;                              Label.Breakpoint("test_step_cast3");\r
+            Console.WriteLine("Test steps for casts end.");                 Label.Breakpoint("test_step_cast_end");\r
+\r
+            Label.Checkpoint("test_step_cast", "test_step_breakpoint", (Object context) => {\r
+                Context Context = (Context)context;\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_cast1");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
+\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_cast2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_op_implicit_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_op_implicit_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_op_implicit_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_cast2");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
+\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_cast3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_op_explicit_1");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_op_explicit_2");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_op_explicit_3");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_cast3");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
+\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_cast_end");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
+            });\r
+\r
+            // Test steps with breakpoint in filtered methods.\r
+\r
+            var test_obj = new TestBreakpointInProperty();                  Label.Breakpoint("test_break_property_1");\r
+            test_obj.Data = 5;                                              Label.Breakpoint("test_break_property_2");\r
+            int i = test_obj.Data;                                          Label.Breakpoint("test_break_property_3");\r
+            Console.WriteLine("Test steps with breakpoint end.");           Label.Breakpoint("test_step_breakpoint_end");\r
+\r
+            Label.Checkpoint("test_step_breakpoint", "test_step_arguments", (Object context) => {\r
+                Context Context = (Context)context;\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_1");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
+\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_getter_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_getter_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_getter_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_breakpoint_end");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
+            });\r
+\r
+            // Test step-in into method arguments.\r
+\r
+            TestStepInArguments C = new TestStepInArguments();              Label.Breakpoint("test_step_arguments_1");\r
+            C.M3(C.P1, C.P2);                                               Label.Breakpoint("test_step_arguments_2");\r
+            C.M4(C.M1(), C.M2(), C.M1());                                   Label.Breakpoint("test_step_arguments_3");\r
+            C.M3(C.M5(C.P1), C.M5(C.P1));                                   Label.Breakpoint("test_step_arguments_4");\r
+            C.M6();                                                         Label.Breakpoint("test_step_arguments_5");\r
+            C.M3(C.M6(), C.M6());                                           Label.Breakpoint("test_step_arguments_6");\r
+            Console.WriteLine("Test steps for arguments end.");             Label.Breakpoint("test_step_arguments_end");\r
+\r
+            Label.Checkpoint("test_step_arguments", "finish", (Object context) => {\r
+                Context Context = (Context)context;\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_1");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
+\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_P1_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_P1_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_P1_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_P2_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_P2_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_P2_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M1_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M1_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M1_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M2_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M2_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M2_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M1_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M1_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M1_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M4_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M4_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M4_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_4");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_P1_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_P1_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_P1_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_4");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M5_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M5_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M5_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_4");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_P1_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_P1_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_P1_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_4");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M5_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M5_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M5_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_4");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_4");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_5");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_6");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_6");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_end");\r
                 Context.StepOut(@"__FILE__:__LINE__");\r
             });\r
 \r
@@ -314,19 +629,34 @@ namespace MITestNoJMCNoFilterStepping
         }\r
 \r
         [DebuggerStepThroughAttribute()]\r
-        static void test_attr_func1()\r
+        static void test_attr_func1_1()\r
         {\r
         }\r
+        [DebuggerStepThroughAttribute()]\r
+        static int test_attr_func1_2()\r
+        {\r
+            return 5;\r
+        }\r
 \r
         [DebuggerNonUserCodeAttribute()]\r
-        static void test_attr_func2()\r
-        {                                              Label.Breakpoint("test_attr_func2_in");\r
+        static void test_attr_func2_1()\r
+        {                                              Label.Breakpoint("test_attr_func2_1_in");\r
+        }\r
+        [DebuggerNonUserCodeAttribute()]\r
+        static int test_attr_func2_2()\r
+        {                                              Label.Breakpoint("test_attr_func2_2_in");\r
+            return 5;\r
         }\r
 \r
         [DebuggerHiddenAttribute()]\r
-        static void test_attr_func3()\r
+        static void test_attr_func3_1()\r
         {\r
         }\r
+        [DebuggerHiddenAttribute()]\r
+        static int test_attr_func3_2()\r
+        {\r
+            return 5;\r
+        }\r
 \r
         public static int test_property1\r
         {\r
index d34cbbaff79d5e3c695cc368abb10122afc9a37a..67ee7e1c9219964540387637c8822ea3345884ed 100644 (file)
@@ -235,6 +235,63 @@ namespace MITestStepping
         }
     }
 
+    public class TestBreakpointInProperty
+    {
+        private int _value = 7;
+
+        private int AddOne(int data)
+        {
+            return data + 1;                                    Label.Breakpoint("test_break_property_getter_1");
+        Label.Breakpoint("test_break_property_getter_2");}
+
+        public int Data
+        {
+            get
+            {
+                int tmp = AddOne(_value);                       Label.Breakpoint("test_break_property_getter_3");
+                return tmp;                                     Label.Breakpoint("test_break_property_getter_4");
+            Label.Breakpoint("test_break_property_getter_5");}
+            set
+            {
+                _value = value;                             Label.Breakpoint("test_break_property_setter_1");
+            Label.Breakpoint("test_break_property_setter_2");}
+        }
+    }
+
+    class TestStepInArguments
+    {
+        public int P1 => 1;
+        public int P2 => 2;
+        
+        public int M1()
+        {                                                                   Label.Breakpoint("test_step_arguments_M1_1");
+            return 1;                                                       Label.Breakpoint("test_step_arguments_M1_2");
+        Label.Breakpoint("test_step_arguments_M1_3");}
+        public int M2()
+        {                                                                   Label.Breakpoint("test_step_arguments_M2_1");
+            return 2;                                                       Label.Breakpoint("test_step_arguments_M2_2");
+        Label.Breakpoint("test_step_arguments_M2_3");}
+
+        public void M3(int a, int b)
+        {                                                                   Label.Breakpoint("test_step_arguments_M3_1");
+            ;                                                               Label.Breakpoint("test_step_arguments_M3_2");
+        Label.Breakpoint("test_step_arguments_M3_3");}
+        public void M4(int a, int b, int c = 0, int d = 0)
+        {                                                                   Label.Breakpoint("test_step_arguments_M4_1");
+            ;                                                               Label.Breakpoint("test_step_arguments_M4_2");
+        Label.Breakpoint("test_step_arguments_M4_3");}
+        public int M5(int k)
+        {                                                                   Label.Breakpoint("test_step_arguments_M5_1");
+            return k + 1;                                                   Label.Breakpoint("test_step_arguments_M5_2");
+        Label.Breakpoint("test_step_arguments_M5_3");}
+
+        [DebuggerStepThrough]
+        public int M6()
+        {
+            return 1;
+        }
+    }
+
     class Program
     {
         static void Main(string[] args)
@@ -245,6 +302,8 @@ namespace MITestStepping
                 Context.WasEntryPointHit(@"__FILE__:__LINE__");
                 Context.EnableBreakpoint(@"__FILE__:__LINE__", "inside_func1_1"); // check, that step-in and breakpoint at same line will generate only one event - step
                 Context.EnableBreakpoint(@"__FILE__:__LINE__", "inside_func2_1"); // check, that step-over and breakpoint inside method will generate breakpoint and reset step
+                Context.EnableBreakpoint(@"__FILE__:__LINE__", "test_break_property_getter_1");
+                Context.EnableBreakpoint(@"__FILE__:__LINE__", "test_break_property_setter_1");
                 Context.StepOver(@"__FILE__:__LINE__");
             });
 
@@ -274,6 +333,8 @@ namespace MITestStepping
 
             Label.Checkpoint("step_over", "step_over_breakpoint", (Object context) => {
                 Context Context = (Context)context;
+                Context.WasStep(@"__FILE__:__LINE__", "step_func1");
+                Context.StepOver(@"__FILE__:__LINE__");
                 Context.WasStep(@"__FILE__:__LINE__", "step_func2");
                 Context.StepOver(@"__FILE__:__LINE__");
             });
@@ -282,17 +343,29 @@ namespace MITestStepping
 
             // Test debugger attribute on methods with JMC enabled.
 
-            test_attr_func1();                                              Label.Breakpoint("test_attr_func1");
-            test_attr_func2();                                              Label.Breakpoint("test_attr_func2");
-            test_attr_func3();                                              Label.Breakpoint("test_attr_func3");
+            test_attr_func1_1();                                            Label.Breakpoint("test_attr_func1_1");
+            test_attr_func1_2();                                            Label.Breakpoint("test_attr_func1_2");
+            test_attr_func2_1();                                            Label.Breakpoint("test_attr_func2_1");
+            test_attr_func2_2();                                            Label.Breakpoint("test_attr_func2_2");
+            test_attr_func3_1();                                            Label.Breakpoint("test_attr_func3_1");
+            test_attr_func3_2();                                            Label.Breakpoint("test_attr_func3_2");
 
             Label.Checkpoint("test_attr1", "test_attr2", (Object context) => {
                 Context Context = (Context)context;
-                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func1");
+                Context.WasStep(@"__FILE__:__LINE__", "step_func2");
+                Context.StepOver(@"__FILE__:__LINE__");
+
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func1_1");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func1_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func2_1");
                 Context.StepIn(@"__FILE__:__LINE__");
-                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func2");
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func2_2");
                 Context.StepIn(@"__FILE__:__LINE__");
-                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func3");
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func3_1");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func3_2");
                 Context.StepIn(@"__FILE__:__LINE__");
             });
 
@@ -343,6 +416,8 @@ namespace MITestStepping
                 Context.StepIn(@"__FILE__:__LINE__");
                 Context.WasStep(@"__FILE__:__LINE__", "test_step_through_Calc1");
                 Context.StepOut(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_through1");
+                Context.StepOver(@"__FILE__:__LINE__");
 
                 Context.WasStep(@"__FILE__:__LINE__", "test_step_through2");
                 Context.StepIn(@"__FILE__:__LINE__");
@@ -352,6 +427,8 @@ namespace MITestStepping
                 Context.StepIn(@"__FILE__:__LINE__");
                 Context.WasStep(@"__FILE__:__LINE__", "test_step_through_Calc1");
                 Context.StepOut(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_through2");
+                Context.StepOver(@"__FILE__:__LINE__");
 
                 Context.WasStep(@"__FILE__:__LINE__", "test_step_through_end");
                 Context.StepOver(@"__FILE__:__LINE__");
@@ -364,7 +441,7 @@ namespace MITestStepping
             Digit digit_var = (Digit)byte_var;                              Label.Breakpoint("test_step_cast3");
             Console.WriteLine("Test steps for casts end.");                 Label.Breakpoint("test_step_cast_end");
 
-            Label.Checkpoint("test_step_cast", "finish", (Object context) => {
+            Label.Checkpoint("test_step_cast", "test_step_breakpoint", (Object context) => {
                 Context Context = (Context)context;
                 Context.WasStep(@"__FILE__:__LINE__", "test_step_cast1");
                 Context.StepOver(@"__FILE__:__LINE__");
@@ -374,6 +451,152 @@ namespace MITestStepping
                 Context.StepIn(@"__FILE__:__LINE__");
 
                 Context.WasStep(@"__FILE__:__LINE__", "test_step_cast_end");
+                Context.StepOver(@"__FILE__:__LINE__");
+            });
+
+            // Test steps with breakpoint in filtered methods.
+
+            var test_obj = new TestBreakpointInProperty();                  Label.Breakpoint("test_break_property_1");
+            test_obj.Data = 5;                                              Label.Breakpoint("test_break_property_2");
+            int i = test_obj.Data;                                          Label.Breakpoint("test_break_property_3");
+            Console.WriteLine("Test steps with breakpoint end.");           Label.Breakpoint("test_step_breakpoint_end");
+
+            Label.Checkpoint("test_step_breakpoint", "test_step_arguments", (Object context) => {
+                Context Context = (Context)context;
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_1");
+                Context.StepOver(@"__FILE__:__LINE__");
+
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasBreakpointHit(@"__FILE__:__LINE__", "test_break_property_setter_1");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_setter_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_2");
+                Context.StepOver(@"__FILE__:__LINE__");
+
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasBreakpointHit(@"__FILE__:__LINE__", "test_break_property_getter_1");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_getter_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_getter_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_getter_4");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_getter_5");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_3");
+                Context.StepOver(@"__FILE__:__LINE__");
+
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_breakpoint_end");
+                Context.StepOver(@"__FILE__:__LINE__");
+            });
+
+            // Test step-in into method arguments.
+
+            TestStepInArguments C = new TestStepInArguments();              Label.Breakpoint("test_step_arguments_1");
+            C.M3(C.P1, C.P2);                                               Label.Breakpoint("test_step_arguments_2");
+            C.M4(C.M1(), C.M2(), C.M1());                                   Label.Breakpoint("test_step_arguments_3");
+            C.M3(C.M5(C.P1), C.M5(C.P1));                                   Label.Breakpoint("test_step_arguments_4");
+            C.M6();                                                         Label.Breakpoint("test_step_arguments_5");
+            C.M3(C.M6(), C.M6());                                           Label.Breakpoint("test_step_arguments_6");
+            Console.WriteLine("Test steps for arguments end.");             Label.Breakpoint("test_step_arguments_end");
+
+            Label.Checkpoint("test_step_arguments", "finish", (Object context) => {
+                Context Context = (Context)context;
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_1");
+                Context.StepOver(@"__FILE__:__LINE__");
+
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_1");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M1_1");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M1_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M1_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M2_1");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M2_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M2_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M1_1");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M1_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M1_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M4_1");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M4_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M4_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_4");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M5_1");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M5_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M5_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_4");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M5_1");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M5_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M5_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_4");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_1");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_4");
+                Context.StepIn(@"__FILE__:__LINE__");
+
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_5");
+                Context.StepIn(@"__FILE__:__LINE__");
+
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_6");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_1");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_6");
+                Context.StepIn(@"__FILE__:__LINE__");
+
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_end");
                 Context.StepOut(@"__FILE__:__LINE__");
             });
 
@@ -413,19 +636,34 @@ namespace MITestStepping
         }
 
         [DebuggerStepThroughAttribute()]
-        static void test_attr_func1()
+        static void test_attr_func1_1()
         {
         }
+        [DebuggerStepThroughAttribute()]
+        static int test_attr_func1_2()
+        {
+            return 5;
+        }
 
         [DebuggerNonUserCodeAttribute()]
-        static void test_attr_func2()
+        static void test_attr_func2_1()
+        {
+        }
+        [DebuggerNonUserCodeAttribute()]
+        static int test_attr_func2_2()
         {
+            return 5;
         }
 
         [DebuggerHiddenAttribute()]
-        static void test_attr_func3()
+        static void test_attr_func3_1()
         {
         }
+        [DebuggerHiddenAttribute()]
+        static int test_attr_func3_2()
+        {
+            return 5;
+        }
 
         public static int test_property1
         {
index 3d3b6a9e8246a0d1b1425937f645a1565b9be7f6..fd8ab10ff40cdce9cdcfbbb1da872d484036ca72 100644 (file)
@@ -290,6 +290,9 @@ namespace VSCodeTestAsyncStepping
 
             Label.Checkpoint("step_out_func1_check", "step_in_func4", (Object context) => {
                 Context Context = (Context)context;
+                Context.WasStep(@"__FILE__:__LINE__", "step_func1");
+                Context.StepOver(@"__FILE__:__LINE__");
+
                 Context.WasStep(@"__FILE__:__LINE__", "step_func4");
                 Context.StepIn(@"__FILE__:__LINE__");
             });
@@ -299,6 +302,9 @@ namespace VSCodeTestAsyncStepping
 
             Label.Checkpoint("step_out_func4_check", "step_in_func2", (Object context) => {
                 Context Context = (Context)context;
+                Context.WasStep(@"__FILE__:__LINE__", "step_func4");
+                Context.StepOver(@"__FILE__:__LINE__");
+
                 Context.WasStep(@"__FILE__:__LINE__", "step_func2");
                 Context.StepIn(@"__FILE__:__LINE__");
             });
@@ -308,6 +314,9 @@ namespace VSCodeTestAsyncStepping
 
             Label.Checkpoint("step_out_func2_check", "step_in_func3_cycle1", (Object context) => {
                 Context Context = (Context)context;
+                Context.WasStep(@"__FILE__:__LINE__", "step_func2");
+                Context.StepOver(@"__FILE__:__LINE__");
+
                 Context.WasStep(@"__FILE__:__LINE__", "step_func3_cycle1");
                 Context.StepIn(@"__FILE__:__LINE__");
             });
@@ -318,6 +327,9 @@ namespace VSCodeTestAsyncStepping
 
             Label.Checkpoint("step_out_func3_check_cycle1", "step_in_func3_cycle2", (Object context) => {
                 Context Context = (Context)context;
+                Context.WasStep(@"__FILE__:__LINE__", "step_func3_cycle1");
+                Context.StepOver(@"__FILE__:__LINE__");
+
                 Context.WasStep(@"__FILE__:__LINE__", "step_func3_cycle2");
                 Context.StepIn(@"__FILE__:__LINE__");
             });
@@ -330,6 +342,9 @@ namespace VSCodeTestAsyncStepping
 
             Label.Checkpoint("step_whenall", "test_attr1", (Object context) => {
                 Context Context = (Context)context;
+                Context.WasStep(@"__FILE__:__LINE__", "step_func3_cycle2");
+                Context.StepOver(@"__FILE__:__LINE__");
+
                 Context.WasStep(@"__FILE__:__LINE__", "step_whenall_1");
                 Context.StepOver(@"__FILE__:__LINE__");
                 Context.WasStep(@"__FILE__:__LINE__", "step_whenall_2");
index d70ac4e7e94f3a42ddbccc92e88bf02aa0a6017e..138563d7980c50b7fc48064fffbad7f1c037c361 100644 (file)
@@ -265,6 +265,8 @@ namespace VSCodeTestNoJMCAsyncStepping
                 Context.StepIn(@"__FILE__:__LINE__");\r
                 Context.WasStep(@"__FILE__:__LINE__", "test_attr_func2_in");\r
                 Context.StepOut(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func2");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
                 Context.WasStep(@"__FILE__:__LINE__", "test_attr_func3");\r
                 Context.StepIn(@"__FILE__:__LINE__");\r
             });\r
@@ -283,6 +285,8 @@ namespace VSCodeTestNoJMCAsyncStepping
                 Context.StepIn(@"__FILE__:__LINE__");\r
                 Context.WasStep(@"__FILE__:__LINE__", "test_attr_class2_func_in");\r
                 Context.StepOut(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_class2_func");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
                 Context.WasStep(@"__FILE__:__LINE__", "test_attr_end");\r
 \r
                 Context.AddBreakpoint(@"__FILE__:__LINE__", "test_async_void1");\r
index 56e344d1967c1f09d6a9b77bafeb65b542e4972d..9c953e957713f4055c2d08f9e025bd20508879f1 100644 (file)
@@ -229,6 +229,95 @@ namespace NetcoreDbgTest.Script
 \r
 namespace VSCodeTestNoJMCNoFilterStepping\r
 {\r
+    public readonly struct Digit\r
+    {\r
+        private readonly byte digit;\r
+\r
+        public Digit(byte digit)\r
+        {\r
+            this.digit = digit;\r
+        }\r
+        public static implicit operator byte(Digit d)\r
+        {                                                       Label.Breakpoint("test_op_implicit_1");\r
+            return d.digit;                                     Label.Breakpoint("test_op_implicit_2");\r
+        Label.Breakpoint("test_op_implicit_3");}\r
+        public static explicit operator Digit(byte b)\r
+        {                                                       Label.Breakpoint("test_op_explicit_1");\r
+            return new Digit(b);                                Label.Breakpoint("test_op_explicit_2");\r
+        Label.Breakpoint("test_op_explicit_3");}\r
+    }\r
+\r
+    public class TestBreakpointInProperty\r
+    {\r
+        private int _value = 7;\r
+\r
+        private int AddOne(int data)\r
+        {                                                       Label.Breakpoint("test_break_property_getter_1");\r
+            return data + 1;                                    Label.Breakpoint("test_break_property_getter_2");\r
+        Label.Breakpoint("test_break_property_getter_3");}\r
+\r
+        public int Data\r
+        {\r
+            [DebuggerStepThrough]\r
+            get\r
+            {\r
+                int tmp = AddOne(_value);\r
+                return tmp;\r
+            }\r
+            [DebuggerStepThrough]\r
+            set\r
+            {\r
+                _value = value;\r
+            }\r
+        }\r
+    }\r
+\r
+    class TestStepInArguments\r
+    {\r
+        public int P1\r
+        {\r
+            get\r
+            {                                                               Label.Breakpoint("test_step_arguments_P1_1");\r
+                return 1;                                                   Label.Breakpoint("test_step_arguments_P1_2");\r
+            Label.Breakpoint("test_step_arguments_P1_3");}\r
+        }\r
+        public int P2\r
+        {\r
+            get\r
+            {                                                               Label.Breakpoint("test_step_arguments_P2_1");\r
+                return 1;                                                   Label.Breakpoint("test_step_arguments_P2_2");\r
+            Label.Breakpoint("test_step_arguments_P2_3");}\r
+        }\r
+        \r
+        public int M1()\r
+        {                                                                   Label.Breakpoint("test_step_arguments_M1_1");\r
+            return 1;                                                       Label.Breakpoint("test_step_arguments_M1_2");\r
+        Label.Breakpoint("test_step_arguments_M1_3");}\r
+        public int M2()\r
+        {                                                                   Label.Breakpoint("test_step_arguments_M2_1");\r
+            return 2;                                                       Label.Breakpoint("test_step_arguments_M2_2");\r
+        Label.Breakpoint("test_step_arguments_M2_3");}\r
+\r
+        public void M3(int a, int b)\r
+        {                                                                   Label.Breakpoint("test_step_arguments_M3_1");\r
+            ;                                                               Label.Breakpoint("test_step_arguments_M3_2");\r
+        Label.Breakpoint("test_step_arguments_M3_3");}\r
+        public void M4(int a, int b, int c = 0, int d = 0)\r
+        {                                                                   Label.Breakpoint("test_step_arguments_M4_1");\r
+            ;                                                               Label.Breakpoint("test_step_arguments_M4_2");\r
+        Label.Breakpoint("test_step_arguments_M4_3");}\r
+        public int M5(int k)\r
+        {                                                                   Label.Breakpoint("test_step_arguments_M5_1");\r
+            return k + 1;                                                   Label.Breakpoint("test_step_arguments_M5_2");\r
+        Label.Breakpoint("test_step_arguments_M5_3");}\r
+\r
+        [DebuggerStepThrough]\r
+        public int M6()\r
+        {\r
+            return 1;\r
+        }\r
+    }\r
+\r
     class Program\r
     {\r
         static void Main(string[] args)\r
@@ -243,29 +332,44 @@ namespace VSCodeTestNoJMCNoFilterStepping
 \r
             // Test debugger attribute on methods with JMC disabled.\r
 \r
-            test_attr_func1();                                              Label.Breakpoint("test_attr_func1");\r
+            test_attr_func1_1();                                            Label.Breakpoint("test_attr_func1_1");\r
+            test_attr_func1_2();                                            Label.Breakpoint("test_attr_func1_2");\r
 \r
             Label.Checkpoint("test_attr1", "test_attr2", (Object context) => {\r
                 Context Context = (Context)context;\r
-                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func1");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func1_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func1_2");\r
                 Context.StepIn(@"__FILE__:__LINE__");\r
             });\r
 \r
-            test_attr_func2();                                              Label.Breakpoint("test_attr_func2");\r
+            test_attr_func2_1();                                            Label.Breakpoint("test_attr_func2_1");\r
+            test_attr_func2_2();                                            Label.Breakpoint("test_attr_func2_2");\r
 \r
             Label.Checkpoint("test_attr2", "test_attr3", (Object context) => {\r
                 Context Context = (Context)context;\r
-                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func2");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func2_1");\r
                 Context.StepIn(@"__FILE__:__LINE__");\r
-                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func2_in");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func2_1_in");\r
                 Context.StepOut(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func2_1");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func2_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func2_2_in");\r
+                Context.StepOut(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func2_2");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
             });\r
 \r
-            test_attr_func3();                                              Label.Breakpoint("test_attr_func3");\r
+            test_attr_func3_1();                                            Label.Breakpoint("test_attr_func3_1");\r
+            test_attr_func3_2();                                            Label.Breakpoint("test_attr_func3_2");\r
 \r
             Label.Checkpoint("test_attr3", "test_attr4", (Object context) => {\r
                 Context Context = (Context)context;\r
-                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func3");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func3_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func3_2");\r
                 Context.StepIn(@"__FILE__:__LINE__");\r
             });\r
 \r
@@ -295,6 +399,9 @@ namespace VSCodeTestNoJMCNoFilterStepping
 \r
             Label.Checkpoint("test_property_attr1", "test_property_attr2", (Object context) => {\r
                 Context Context = (Context)context;\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_class2_func");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
+\r
                 Context.WasStep(@"__FILE__:__LINE__", "test_property1");\r
                 Context.StepIn(@"__FILE__:__LINE__");\r
             });\r
@@ -340,7 +447,7 @@ namespace VSCodeTestNoJMCNoFilterStepping
             res = TestImplHolder.getImpl2().Calc1();                        Label.Breakpoint("test_step_through2");\r
             Console.WriteLine("Test step through end.");                    Label.Breakpoint("test_step_through_end");\r
 \r
-            Label.Checkpoint("test_step_through", "finish", (Object context) => {\r
+            Label.Checkpoint("test_step_through", "test_step_cast", (Object context) => {\r
                 Context Context = (Context)context;\r
                 Context.WasStep(@"__FILE__:__LINE__", "test_step_through1");\r
                 Context.StepIn(@"__FILE__:__LINE__");\r
@@ -350,6 +457,8 @@ namespace VSCodeTestNoJMCNoFilterStepping
                 Context.StepIn(@"__FILE__:__LINE__");\r
                 Context.WasStep(@"__FILE__:__LINE__", "test_step_through_Calc1");\r
                 Context.StepOut(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_through1");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
 \r
                 Context.WasStep(@"__FILE__:__LINE__", "test_step_through2");\r
                 Context.StepIn(@"__FILE__:__LINE__");\r
@@ -359,8 +468,214 @@ namespace VSCodeTestNoJMCNoFilterStepping
                 Context.StepIn(@"__FILE__:__LINE__");\r
                 Context.WasStep(@"__FILE__:__LINE__", "test_step_through_Calc1");\r
                 Context.StepOut(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_through2");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
 \r
                 Context.WasStep(@"__FILE__:__LINE__", "test_step_through_end");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
+            });\r
+\r
+            // Test steps for casts.\r
+\r
+            var d = new Digit(100);                                         Label.Breakpoint("test_step_cast1");\r
+            byte byte_var = d;                                              Label.Breakpoint("test_step_cast2");\r
+            Digit digit_var = (Digit)byte_var;                              Label.Breakpoint("test_step_cast3");\r
+            Console.WriteLine("Test steps for casts end.");                 Label.Breakpoint("test_step_cast_end");\r
+\r
+            Label.Checkpoint("test_step_cast", "test_step_breakpoint", (Object context) => {\r
+                Context Context = (Context)context;\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_cast1");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
+\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_cast2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_op_implicit_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_op_implicit_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_op_implicit_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_cast2");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
+\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_cast3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_op_explicit_1");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_op_explicit_2");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_op_explicit_3");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_cast3");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
+\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_cast_end");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
+            });\r
+\r
+            // Test steps with breakpoint in filtered methods.\r
+\r
+            var test_obj = new TestBreakpointInProperty();                  Label.Breakpoint("test_break_property_1");\r
+            test_obj.Data = 5;                                              Label.Breakpoint("test_break_property_2");\r
+            int i = test_obj.Data;                                          Label.Breakpoint("test_break_property_3");\r
+            Console.WriteLine("Test steps with breakpoint end.");           Label.Breakpoint("test_step_breakpoint_end");\r
+\r
+            Label.Checkpoint("test_step_breakpoint", "test_step_arguments", (Object context) => {\r
+                Context Context = (Context)context;\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_1");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
+\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_getter_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_getter_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_getter_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_breakpoint_end");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
+            });\r
+\r
+            // Test step-in into method arguments.\r
+\r
+            TestStepInArguments C = new TestStepInArguments();              Label.Breakpoint("test_step_arguments_1");\r
+            C.M3(C.P1, C.P2);                                               Label.Breakpoint("test_step_arguments_2");\r
+            C.M4(C.M1(), C.M2(), C.M1());                                   Label.Breakpoint("test_step_arguments_3");\r
+            C.M3(C.M5(C.P1), C.M5(C.P1));                                   Label.Breakpoint("test_step_arguments_4");\r
+            C.M6();                                                         Label.Breakpoint("test_step_arguments_5");\r
+            C.M3(C.M6(), C.M6());                                           Label.Breakpoint("test_step_arguments_6");\r
+            Console.WriteLine("Test steps for arguments end.");             Label.Breakpoint("test_step_arguments_end");\r
+\r
+            Label.Checkpoint("test_step_arguments", "finish", (Object context) => {\r
+                Context Context = (Context)context;\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_1");\r
+                Context.StepOver(@"__FILE__:__LINE__");\r
+\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_P1_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_P1_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_P1_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_P2_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_P2_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_P2_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M1_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M1_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M1_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M2_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M2_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M2_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M1_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M1_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M1_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M4_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M4_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M4_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_4");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_P1_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_P1_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_P1_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_4");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M5_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M5_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M5_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_4");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_P1_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_P1_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_P1_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_4");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M5_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M5_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M5_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_4");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_4");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_5");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_6");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_1");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_2");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_3");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_6");\r
+                Context.StepIn(@"__FILE__:__LINE__");\r
+\r
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_end");\r
                 Context.StepOut(@"__FILE__:__LINE__");\r
             });\r
 \r
@@ -372,19 +687,34 @@ namespace VSCodeTestNoJMCNoFilterStepping
         }\r
 \r
         [DebuggerStepThroughAttribute()]\r
-        static void test_attr_func1()\r
+        static void test_attr_func1_1()\r
         {\r
         }\r
+        [DebuggerStepThroughAttribute()]\r
+        static int test_attr_func1_2()\r
+        {\r
+            return 5;\r
+        }\r
 \r
         [DebuggerNonUserCodeAttribute()]\r
-        static void test_attr_func2()\r
-        {                                              Label.Breakpoint("test_attr_func2_in");\r
+        static void test_attr_func2_1()\r
+        {                                              Label.Breakpoint("test_attr_func2_1_in");\r
+        }\r
+        [DebuggerNonUserCodeAttribute()]\r
+        static int test_attr_func2_2()\r
+        {                                              Label.Breakpoint("test_attr_func2_2_in");\r
+            return 5;\r
         }\r
 \r
         [DebuggerHiddenAttribute()]\r
-        static void test_attr_func3()\r
+        static void test_attr_func3_1()\r
         {\r
         }\r
+        [DebuggerHiddenAttribute()]\r
+        static int test_attr_func3_2()\r
+        {\r
+            return 5;\r
+        }\r
 \r
         public static int test_property1\r
         {\r
index 98888f795ad40ec1ee311e9cbae2cce7042cc4da..098cc649c09796cbe87ea7ada91b7fb94e128406 100644 (file)
@@ -246,6 +246,63 @@ namespace VSCodeTestStepping
         }
     }
 
+    public class TestBreakpointInProperty
+    {
+        private int _value = 7;
+
+        private int AddOne(int data)
+        {
+            return data + 1;                                    Label.Breakpoint("test_break_property_getter_1");
+        Label.Breakpoint("test_break_property_getter_2");}
+
+        public int Data
+        {
+            get
+            {
+                int tmp = AddOne(_value);                       Label.Breakpoint("test_break_property_getter_3");
+                return tmp;                                     Label.Breakpoint("test_break_property_getter_4");
+            Label.Breakpoint("test_break_property_getter_5");}
+            set
+            {
+                _value = value;                             Label.Breakpoint("test_break_property_setter_1");
+            Label.Breakpoint("test_break_property_setter_2");}
+        }
+    }
+
+    class TestStepInArguments
+    {
+        public int P1 => 1;
+        public int P2 => 2;
+        
+        public int M1()
+        {                                                                   Label.Breakpoint("test_step_arguments_M1_1");
+            return 1;                                                       Label.Breakpoint("test_step_arguments_M1_2");
+        Label.Breakpoint("test_step_arguments_M1_3");}
+        public int M2()
+        {                                                                   Label.Breakpoint("test_step_arguments_M2_1");
+            return 2;                                                       Label.Breakpoint("test_step_arguments_M2_2");
+        Label.Breakpoint("test_step_arguments_M2_3");}
+
+        public void M3(int a, int b)
+        {                                                                   Label.Breakpoint("test_step_arguments_M3_1");
+            ;                                                               Label.Breakpoint("test_step_arguments_M3_2");
+        Label.Breakpoint("test_step_arguments_M3_3");}
+        public void M4(int a, int b, int c = 0, int d = 0)
+        {                                                                   Label.Breakpoint("test_step_arguments_M4_1");
+            ;                                                               Label.Breakpoint("test_step_arguments_M4_2");
+        Label.Breakpoint("test_step_arguments_M4_3");}
+        public int M5(int k)
+        {                                                                   Label.Breakpoint("test_step_arguments_M5_1");
+            return k + 1;                                                   Label.Breakpoint("test_step_arguments_M5_2");
+        Label.Breakpoint("test_step_arguments_M5_3");}
+
+        [DebuggerStepThrough]
+        public int M6()
+        {
+            return 1;
+        }
+    }
+
     class Program
     {
         static void Main(string[] args)
@@ -255,6 +312,8 @@ namespace VSCodeTestStepping
                 Context.PrepareStart(@"__FILE__:__LINE__");
                 Context.AddBreakpoint(@"__FILE__:__LINE__", "inside_func1_1"); // check, that step-in and breakpoint at same line will generate only one event - step
                 Context.AddBreakpoint(@"__FILE__:__LINE__", "inside_func2_1"); // check, that step-over and breakpoint inside method will generate breakpoint and reset step
+                Context.AddBreakpoint(@"__FILE__:__LINE__", "test_break_property_getter_1");
+                Context.AddBreakpoint(@"__FILE__:__LINE__", "test_break_property_setter_1");
                 Context.SetBreakpoints(@"__FILE__:__LINE__");
                 Context.PrepareEnd(@"__FILE__:__LINE__");
                 Context.WasEntryPointHit(@"__FILE__:__LINE__");
@@ -287,6 +346,8 @@ namespace VSCodeTestStepping
 
             Label.Checkpoint("step_over", "step_over_breakpoint", (Object context) => {
                 Context Context = (Context)context;
+                Context.WasStep(@"__FILE__:__LINE__", "step_func1");
+                Context.StepOver(@"__FILE__:__LINE__");
                 Context.WasStep(@"__FILE__:__LINE__", "step_func2");
                 Context.StepOver(@"__FILE__:__LINE__");
             });
@@ -295,17 +356,29 @@ namespace VSCodeTestStepping
 
             // Test debugger attribute on methods with JMC enabled.
 
-            test_attr_func1();                                              Label.Breakpoint("test_attr_func1");
-            test_attr_func2();                                              Label.Breakpoint("test_attr_func2");
-            test_attr_func3();                                              Label.Breakpoint("test_attr_func3");
+            test_attr_func1_1();                                            Label.Breakpoint("test_attr_func1_1");
+            test_attr_func1_2();                                            Label.Breakpoint("test_attr_func1_2");
+            test_attr_func2_1();                                            Label.Breakpoint("test_attr_func2_1");
+            test_attr_func2_2();                                            Label.Breakpoint("test_attr_func2_2");
+            test_attr_func3_1();                                            Label.Breakpoint("test_attr_func3_1");
+            test_attr_func3_2();                                            Label.Breakpoint("test_attr_func3_2");
 
             Label.Checkpoint("test_attr1", "test_attr2", (Object context) => {
                 Context Context = (Context)context;
-                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func1");
+                Context.WasStep(@"__FILE__:__LINE__", "step_func2");
+                Context.StepOver(@"__FILE__:__LINE__");
+
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func1_1");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func1_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func2_1");
                 Context.StepIn(@"__FILE__:__LINE__");
-                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func2");
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func2_2");
                 Context.StepIn(@"__FILE__:__LINE__");
-                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func3");
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func3_1");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_attr_func3_2");
                 Context.StepIn(@"__FILE__:__LINE__");
             });
 
@@ -356,6 +429,8 @@ namespace VSCodeTestStepping
                 Context.StepIn(@"__FILE__:__LINE__");
                 Context.WasStep(@"__FILE__:__LINE__", "test_step_through_Calc1");
                 Context.StepOut(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_through1");
+                Context.StepOver(@"__FILE__:__LINE__");
 
                 Context.WasStep(@"__FILE__:__LINE__", "test_step_through2");
                 Context.StepIn(@"__FILE__:__LINE__");
@@ -365,6 +440,8 @@ namespace VSCodeTestStepping
                 Context.StepIn(@"__FILE__:__LINE__");
                 Context.WasStep(@"__FILE__:__LINE__", "test_step_through_Calc1");
                 Context.StepOut(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_through2");
+                Context.StepOver(@"__FILE__:__LINE__");
 
                 Context.WasStep(@"__FILE__:__LINE__", "test_step_through_end");
                 Context.StepOver(@"__FILE__:__LINE__");
@@ -377,7 +454,7 @@ namespace VSCodeTestStepping
             Digit digit_var = (Digit)byte_var;                              Label.Breakpoint("test_step_cast3");
             Console.WriteLine("Test steps for casts end.");                 Label.Breakpoint("test_step_cast_end");
 
-            Label.Checkpoint("test_step_cast", "finish", (Object context) => {
+            Label.Checkpoint("test_step_cast", "test_step_breakpoint", (Object context) => {
                 Context Context = (Context)context;
                 Context.WasStep(@"__FILE__:__LINE__", "test_step_cast1");
                 Context.StepOver(@"__FILE__:__LINE__");
@@ -387,6 +464,152 @@ namespace VSCodeTestStepping
                 Context.StepIn(@"__FILE__:__LINE__");
 
                 Context.WasStep(@"__FILE__:__LINE__", "test_step_cast_end");
+                Context.StepOver(@"__FILE__:__LINE__");
+            });
+
+            // Test steps with breakpoint in filtered methods.
+
+            var test_obj = new TestBreakpointInProperty();                  Label.Breakpoint("test_break_property_1");
+            test_obj.Data = 5;                                              Label.Breakpoint("test_break_property_2");
+            int i = test_obj.Data;                                          Label.Breakpoint("test_break_property_3");
+            Console.WriteLine("Test steps with breakpoint end.");           Label.Breakpoint("test_step_breakpoint_end");
+
+            Label.Checkpoint("test_step_breakpoint", "test_step_arguments", (Object context) => {
+                Context Context = (Context)context;
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_1");
+                Context.StepOver(@"__FILE__:__LINE__");
+
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasBreakpointHit(@"__FILE__:__LINE__", "test_break_property_setter_1");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_setter_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_2");
+                Context.StepOver(@"__FILE__:__LINE__");
+
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasBreakpointHit(@"__FILE__:__LINE__", "test_break_property_getter_1");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_getter_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_getter_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_getter_4");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_getter_5");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_break_property_3");
+                Context.StepOver(@"__FILE__:__LINE__");
+
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_breakpoint_end");
+                Context.StepOver(@"__FILE__:__LINE__");
+            });
+
+            // Test step-in into method arguments.
+
+            TestStepInArguments C = new TestStepInArguments();              Label.Breakpoint("test_step_arguments_1");
+            C.M3(C.P1, C.P2);                                               Label.Breakpoint("test_step_arguments_2");
+            C.M4(C.M1(), C.M2(), C.M1());                                   Label.Breakpoint("test_step_arguments_3");
+            C.M3(C.M5(C.P1), C.M5(C.P1));                                   Label.Breakpoint("test_step_arguments_4");
+            C.M6();                                                         Label.Breakpoint("test_step_arguments_5");
+            C.M3(C.M6(), C.M6());                                           Label.Breakpoint("test_step_arguments_6");
+            Console.WriteLine("Test steps for arguments end.");             Label.Breakpoint("test_step_arguments_end");
+
+            Label.Checkpoint("test_step_arguments", "finish", (Object context) => {
+                Context Context = (Context)context;
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_1");
+                Context.StepOver(@"__FILE__:__LINE__");
+
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_1");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M1_1");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M1_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M1_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M2_1");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M2_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M2_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M1_1");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M1_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M1_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M4_1");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M4_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M4_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_4");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M5_1");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M5_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M5_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_4");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M5_1");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M5_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M5_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_4");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_1");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_4");
+                Context.StepIn(@"__FILE__:__LINE__");
+
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_5");
+                Context.StepIn(@"__FILE__:__LINE__");
+
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_6");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_1");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_2");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_M3_3");
+                Context.StepIn(@"__FILE__:__LINE__");
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_6");
+                Context.StepIn(@"__FILE__:__LINE__");
+
+                Context.WasStep(@"__FILE__:__LINE__", "test_step_arguments_end");
                 Context.StepOut(@"__FILE__:__LINE__");
             });
 
@@ -426,19 +649,34 @@ namespace VSCodeTestStepping
         }
 
         [DebuggerStepThroughAttribute()]
-        static void test_attr_func1()
+        static void test_attr_func1_1()
         {
         }
+        [DebuggerStepThroughAttribute()]
+        static int test_attr_func1_2()
+        {
+            return 5;
+        }
 
         [DebuggerNonUserCodeAttribute()]
-        static void test_attr_func2()
+        static void test_attr_func2_1()
+        {
+        }
+        [DebuggerNonUserCodeAttribute()]
+        static int test_attr_func2_2()
         {
+            return 5;
         }
 
         [DebuggerHiddenAttribute()]
-        static void test_attr_func3()
+        static void test_attr_func3_1()
         {
         }
+        [DebuggerHiddenAttribute()]
+        static int test_attr_func3_2()
+        {
+            return 5;
+        }
 
         public static int test_property1
         {