@@ -10,7 +10,7 @@ mutable struct DebugEngine
10
10
11
11
next_cmd:: Channel{Any}
12
12
13
- frame:: Union{Nothing, JuliaInterpreter.Frame}
13
+ frame:: Union{Nothing,JuliaInterpreter.Frame}
14
14
15
15
expr_splitter:: Union{JuliaInterpreter.ExprSplitter,Nothing}
16
16
@@ -28,13 +28,9 @@ mutable struct DebugEngine
28
28
mod,
29
29
code,
30
30
filename,
31
- stop_on_entry,
32
-
33
- Channel {Any} (Inf ),
34
- nothing ,
31
+ stop_on_entry, Channel {Any} (Inf ),
35
32
nothing ,
36
-
37
- JuliaInterpreter. finish_and_return!,
33
+ nothing , JuliaInterpreter. finish_and_return!,
38
34
String[],
39
35
Set {Any} (),
40
36
nothing ,
@@ -43,7 +39,7 @@ mutable struct DebugEngine
43
39
end
44
40
end
45
41
46
- function get_obj_by_accessor (accessor, super = nothing )
42
+ function get_obj_by_accessor (accessor, super= nothing )
47
43
parts = split (accessor, ' .' )
48
44
@assert length (parts) > 0
49
45
top = popfirst! (parts)
@@ -75,8 +71,8 @@ function get_obj_by_accessor(accessor, super = nothing)
75
71
return nothing
76
72
end
77
73
78
- function toggle_mode_for_all_submodules (mod, compiled, seen = Set ())
79
- for name in names (mod; all = true )
74
+ function toggle_mode_for_all_submodules (mod, compiled, seen= Set ())
75
+ for name in names (mod; all= true )
80
76
if isdefined (mod, name)
81
77
obj = getfield (mod, name)
82
78
if obj != = mod && obj isa Module && ! (obj in seen)
@@ -112,7 +108,7 @@ function set_compiled_functions_modules!(debug_engine::DebugEngine, items::Vecto
112
108
@debug " setting as compiled" items = items
113
109
114
110
# sort inputs once so that removed items are at the end
115
- sort! (items, lt = function (a, b)
111
+ sort! (items, lt= function (a, b)
116
112
am = startswith (a, ' -' )
117
113
bm = startswith (b, ' -' )
118
114
@@ -308,7 +304,7 @@ function Base.run(debug_engine::DebugEngine)
308
304
elseif JuliaInterpreter. shouldbreak (debug_engine. frame, debug_engine. frame. pc)
309
305
debug_engine. on_stop (StopReasonBreakpoint)
310
306
else
311
- put! (debug_engine. next_cmd, (cmd = :continue ,))
307
+ put! (debug_engine. next_cmd, (cmd= :continue ,))
312
308
end
313
309
314
310
@@ -382,7 +378,7 @@ function Base.run(debug_engine::DebugEngine)
382
378
end
383
379
384
380
function terminate (debug_engine:: DebugEngine )
385
- put! (debug_engine. next_cmd, (cmd = :stop ,))
381
+ put! (debug_engine. next_cmd, (cmd= :stop ,))
386
382
end
387
383
388
384
function set_function_breakpoints! (debug_engine:: DebugEngine , breakpoints)
@@ -406,23 +402,23 @@ function set_compiled_mode!(debug_engine::DebugEngine, compiled_mode::Bool)
406
402
end
407
403
408
404
function execution_continue (debug_engine:: DebugEngine )
409
- put! (debug_engine. next_cmd, (cmd = :continue ,))
405
+ put! (debug_engine. next_cmd, (cmd= :continue ,))
410
406
end
411
407
412
408
function execution_next (debug_engine:: DebugEngine )
413
- put! (debug_engine. next_cmd, (cmd = :next ,))
409
+ put! (debug_engine. next_cmd, (cmd= :next ,))
414
410
end
415
411
416
412
function execution_step_in (debug_engine:: DebugEngine , target_id)
417
- put! (debug_engine. next_cmd, (cmd = :stepIn , targetId = target_id))
413
+ put! (debug_engine. next_cmd, (cmd= :stepIn , targetId= target_id))
418
414
end
419
415
420
416
function execution_step_out (debug_engine:: DebugEngine )
421
- put! (debug_engine. next_cmd, (cmd = :stepOut ,))
417
+ put! (debug_engine. next_cmd, (cmd= :stepOut ,))
422
418
end
423
419
424
420
function execution_terminate (debug_engine:: DebugEngine )
425
- put! (debug_engine. next_cmd, (cmd = :stop ,))
421
+ put! (debug_engine. next_cmd, (cmd= :stop ,))
426
422
end
427
423
428
424
end
0 commit comments