Skip to content

Commit bc9d739

Browse files
authored
fixup printing for stdlib files (#78)
1 parent ef0fd74 commit bc9d739

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

Manifest.toml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
55

66
[[CodeTracking]]
7-
deps = ["InteractiveUtils", "UUIDs"]
7+
deps = ["InteractiveUtils", "Test", "UUIDs"]
88
git-tree-sha1 = "983f5f7a57c604322917ab8bc5b86ba914d3c345"
9-
repo-rev = "master"
10-
repo-url = "https://github.com/timholy/CodeTracking.jl.git"
119
uuid = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2"
1210
version = "0.3.2"
1311

12+
[[Distributed]]
13+
deps = ["Random", "Serialization", "Sockets"]
14+
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
15+
1416
[[InteractiveUtils]]
1517
deps = ["Markdown"]
1618
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
@@ -23,6 +25,9 @@ repo-url = "https://github.com/JuliaDebug/JuliaInterpreter.jl"
2325
uuid = "aa1ae85d-cabe-5617-a682-6adf51b2e16a"
2426
version = "0.1.1"
2527

28+
[[Logging]]
29+
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
30+
2631
[[Markdown]]
2732
deps = ["Base64"]
2833
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
@@ -44,6 +49,10 @@ uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
4449
[[Sockets]]
4550
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
4651

52+
[[Test]]
53+
deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
54+
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
55+
4756
[[UUIDs]]
4857
deps = ["Random", "SHA"]
4958
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

src/Debugger.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ using REPL
66
using REPL.LineEdit
77
using REPL.REPLCompletions
88

9+
using CodeTracking
910
using JuliaInterpreter: JuliaInterpreter, Frame, @lookup, FrameCode, BreakpointRef, debug_command, leaf, root
1011

1112
using JuliaInterpreter: pc_expr, moduleof, linenumber, extract_args,

src/locationinfo.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ function locdesc(frame::Frame)
6363
print(io, argname)
6464
!(argT === Any) && print(io, "::", argT)
6565
end
66-
print(io, ") at ", _print_full_path[] ? meth.file : basename(String(meth.file)), ":",meth.line)
66+
path = _print_full_path[] ? meth.file : string(basename(String(meth.file)), ":", meth.line)
67+
path = CodeTracking.replace_buildbot_stdlibpath(String(path))
68+
print(io, ") at ", path)
6769
else
6870
println("not yet implemented")
6971
end

test/misc.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,7 @@ execute_command(state, Val{:n}(), "n")
5858
loc = Debugger.locinfo(state.frame)
5959
@test isfile(loc.filepath)
6060
@test occursin("logging.jl", loc.filepath)
61+
62+
frame = @make_frame Test.eval(1)
63+
desc = Debugger.locdesc(frame)
64+
@test occursin(Sys.STDLIB, desc)

0 commit comments

Comments
 (0)