Skip to content

Commit 0b9f481

Browse files
auduchinokintellij-monorepo-bot
authored andcommitted
RIDER-133448, RIDER-12242, RIDER-132790 Debugger: simplify stepping
* Introduce step handler for retrying Stepping Into * Better DebuggerStepThrough/DebuggerHidden support * Remove extra stepping strategies * Remove shared step handler state GitOrigin-RevId: 653380685681de46a92c30328bb7d7732d3a619a
1 parent c442684 commit 0b9f481

File tree

6 files changed

+217
-0
lines changed

6 files changed

+217
-0
lines changed

rider-fsharp/src/test/kotlin/com/jetbrains/rider/plugins/fsharp/test/cases/debugger/FSharpSteppingTest.kt

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,77 @@ class FSharpSteppingTest : DebuggerTestBase() {
3939
resumeSession()
4040
}, true)
4141
}
42+
43+
@Test
44+
fun testStepIntoFunction() {
45+
testDebugProgram({
46+
toggleBreakpoint("FunctionsModule.fs", 16)
47+
toggleBreakpoint("FunctionsModule.fs", 17)
48+
toggleBreakpoint("FunctionsModule.fs", 18)
49+
toggleBreakpoint("FunctionsModule.fs", 19)
50+
toggleBreakpoint("FunctionsLocal.fs", 16)
51+
toggleBreakpoint("FunctionsLocal.fs", 17)
52+
toggleBreakpoint("FunctionsLocal.fs", 18)
53+
toggleBreakpoint("FunctionsLocal.fs", 19)
54+
55+
}, {
56+
waitForPause()
57+
dumpFullCurrentData(message = "Stopped at module f1 call")
58+
59+
stepInto()
60+
dumpFullCurrentData(message = "Stepped into module f1")
61+
resumeSession()
62+
63+
waitForPause()
64+
dumpFullCurrentData(message = "Stopped at module f2 call")
65+
66+
stepInto()
67+
dumpFullCurrentData(message = "Stepped into module f2")
68+
resumeSession()
69+
70+
waitForPause()
71+
dumpFullCurrentData(message = "Stopped at module f3 call")
72+
73+
stepInto()
74+
dumpFullCurrentData(message = "Stepped into module f3")
75+
resumeSession()
76+
77+
waitForPause()
78+
dumpFullCurrentData(message = "Stopped at module f4 call")
79+
80+
stepInto()
81+
dumpFullCurrentData(message = "Stepped into module f4")
82+
resumeSession()
83+
84+
waitForPause()
85+
dumpFullCurrentData(message = "Stopped at local f1 call")
86+
87+
stepInto()
88+
dumpFullCurrentData(message = "Stepped into local f1")
89+
resumeSession()
90+
91+
waitForPause()
92+
dumpFullCurrentData(message = "Stopped at local f2 call")
93+
94+
stepInto()
95+
dumpFullCurrentData(message = "Stepped into local f2")
96+
resumeSession()
97+
98+
waitForPause()
99+
dumpFullCurrentData(message = "Stopped at local f3 call")
100+
101+
stepInto()
102+
dumpFullCurrentData(message = "Stepped into local f3")
103+
resumeSession()
104+
105+
waitForPause()
106+
dumpFullCurrentData(message = "Stopped at local f4 call")
107+
108+
stepInto()
109+
dumpFullCurrentData(message = "Stepped into local f4")
110+
111+
resumeSession()
112+
}, true)
113+
}
114+
42115
}
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
Stopped at module f1 call:
2+
--> FunctionsModule.fs:16(138,143) // f1 ()
3+
FunctionsModule.run() in SteppingTests.dll
4+
5+
Stepped into module f1:
6+
--> FunctionsModule.fs:4(40,41) // 1
7+
FunctionsModule.f1() in SteppingTests.dll
8+
9+
Stopped at module f2 call:
10+
--> FunctionsModule.fs:17(156,160) // f2 1
11+
FunctionsModule.run() in SteppingTests.dll
12+
13+
Stepped into module f2:
14+
--> FunctionsModule.fs:7(58,63) // x + 1
15+
FunctionsModule.f2() in SteppingTests.dll
16+
x = {int} 1
17+
18+
Stopped at module f3 call:
19+
--> FunctionsModule.fs:18(173,179) // f3 1 2
20+
FunctionsModule.run() in SteppingTests.dll
21+
22+
Stepped into module f3:
23+
--> FunctionsModule.fs:10(82,87) // a + b
24+
FunctionsModule.f3() in SteppingTests.dll
25+
a = {int} 1
26+
b = {int} 2
27+
28+
Stopped at module f4 call:
29+
--> FunctionsModule.fs:19(192,198) // f4 1 2
30+
FunctionsModule.run() in SteppingTests.dll
31+
32+
Stepped into module f4:
33+
--> FunctionsModule.fs:13(106,111) // a + 1
34+
FunctionsModule.f4<int>() in SteppingTests.dll
35+
a = {int} 1
36+
b = {int} 2
37+
+[Type variables]
38+
39+
Stopped at local f1 call:
40+
--> FunctionsLocal.fs:16(169,174) // f1 ()
41+
FunctionsLocal.run() in SteppingTests.dll
42+
+f1 = FunctionsLocal.f1@5
43+
+f2 = FunctionsLocal.f2@8
44+
+f3 = FunctionsLocal.f3@11
45+
+f4 = FunctionsLocal.f4@13
46+
47+
Stepped into local f1:
48+
--> FunctionsLocal.fs:5(60,61) // 1
49+
[email protected]() in SteppingTests.dll
50+
+this = FunctionsLocal.f1@5
51+
unitVar0 = {Unit} null
52+
53+
Stopped at local f2 call:
54+
--> FunctionsLocal.fs:17(187,191) // f2 1
55+
FunctionsLocal.run() in SteppingTests.dll
56+
+f1 = FunctionsLocal.f1@5
57+
+f2 = FunctionsLocal.f2@8
58+
+f3 = FunctionsLocal.f3@11
59+
+f4 = FunctionsLocal.f4@13
60+
61+
Stepped into local f2:
62+
--> FunctionsLocal.fs:8(86,91) // x + 1
63+
[email protected]() in SteppingTests.dll
64+
+this = FunctionsLocal.f2@8
65+
x = {int} 1
66+
67+
Stopped at local f3 call:
68+
--> FunctionsLocal.fs:18(204,210) // f3 1 2
69+
FunctionsLocal.run() in SteppingTests.dll
70+
+f1 = FunctionsLocal.f1@5
71+
+f2 = FunctionsLocal.f2@8
72+
+f3 = FunctionsLocal.f3@11
73+
+f4 = FunctionsLocal.f4@13
74+
75+
Stepped into local f3:
76+
--> FunctionsLocal.fs:11(118,123) // a + b
77+
[email protected]() in SteppingTests.dll
78+
+this = FunctionsLocal.f3@11
79+
a = {int} 1
80+
b = {int} 2
81+
82+
Stopped at local f4 call:
83+
--> FunctionsLocal.fs:19(223,229) // f4 1 2
84+
FunctionsLocal.run() in SteppingTests.dll
85+
+f1 = FunctionsLocal.f1@5
86+
+f2 = FunctionsLocal.f2@8
87+
+f3 = FunctionsLocal.f3@11
88+
+f4 = FunctionsLocal.f4@13
89+
90+
Stepped into local f4:
91+
--> FunctionsLocal.fs:14(150,155) // a + 1
92+
FunctionsLocal.f4@13T<int>.Invoke() in SteppingTests.dll
93+
+this = FunctionsLocal.f4@13T<int>
94+
a = {int} 1
95+
b = {int} 2
96+
+[Type variables]
97+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module FunctionsLocal
2+
3+
let run () =
4+
let f1 () =
5+
1
6+
7+
let f2 x =
8+
x + 1
9+
10+
let f3 a b =
11+
a + b
12+
13+
let f4 a b =
14+
a + 1
15+
16+
let _ = f1 ()
17+
let _ = f2 1
18+
let _ = f3 1 2
19+
let _ = f4 1 2
20+
21+
()
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module FunctionsModule
2+
3+
let f1 () =
4+
1
5+
6+
let f2 x =
7+
x + 1
8+
9+
let f3 a b =
10+
a + b
11+
12+
let f4 a b =
13+
a + 1
14+
15+
let run () =
16+
let _ = f1 ()
17+
let _ = f2 1
18+
let _ = f3 1 2
19+
let _ = f4 1 2
20+
21+
()

rider-fsharp/src/test/testData/solutions/SteppingTests/Program.fs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ type T() =
33
() |> ignore
44

55
let t = T()
6+
7+
FunctionsModule.run()
8+
FunctionsLocal.run()

rider-fsharp/src/test/testData/solutions/SteppingTests/SteppingTests.fsproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9+
<Compile Include="FunctionsLocal.fs" />
10+
<Compile Include="FunctionsModule.fs" />
911
<Compile Include="Program.fs"/>
1012
</ItemGroup>
1113

0 commit comments

Comments
 (0)