Skip to content

Commit 268ac7e

Browse files
authored
Merge pull request #61 from timholy/teh/interpret
Add an interpreter REPL mode
2 parents de5c952 + 130f230 commit 268ac7e

19 files changed

+1753
-687
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
docs/build/
22
docs/site/
3+
test/expected.out
4+
test/failed.out

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ os:
66
- osx
77
julia:
88
- 1.0
9+
- 1.1
910
- nightly
1011
notifications:
1112
email: false

Project.toml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name = "Rebugger"
2+
uuid = "ee283ea6-eecd-56e3-beb3-83eb4d3c31e9"
3+
version = "0.3.0"
4+
5+
[deps]
6+
CodeTracking = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2"
7+
HeaderREPLs = "54d51984-71c9-52bd-8df9-6718e63e4153"
8+
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
9+
JuliaInterpreter = "aa1ae85d-cabe-5617-a682-6adf51b2e16a"
10+
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
11+
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
12+
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
13+
14+
[compat]
15+
HeaderREPLs = "0.3"
16+
17+
[extras]
18+
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
19+
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
20+
TerminalRegressionTests = "98bfdc55-cc95-5876-a49a-74609291cbe0"
21+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
22+
23+
[targets]
24+
test = ["Test", "Colors", "Pkg", "TerminalRegressionTests"]

REQUIRE

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
julia 1.0
2-
Revise 1.0.2
2+
Revise 2
33
HeaderREPLs 0.2
4+
CodeTracking
5+
JuliaInterpreter

appveyor.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
environment:
22
matrix:
33
- julia_version: 1
4+
- julia_version: 1.1
45
- julia_version: nightly
56

67
platform:

docs/Project.toml

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
34

45
[compat]
56
Documenter = "~0.21"

docs/src/index.md

+11-30
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,20 @@
11
# Introduction to Rebugger
22

33
Rebugger is an expression-level debugger for Julia.
4-
It has no ability to interact with or manipulate call stacks (see [Gallium](https://github.com/Keno/Gallium.jl)),
5-
but it can trace execution via the manipulation of Julia expressions.
4+
It has two modes of action:
5+
6+
- an "interpret" mode that lets you step through code, set
7+
breakpoints, and other manipulations common to "typical" debuggers;
8+
- an "edit" mode that presents method bodies as objects for manipulation,
9+
allowing you to interactively play with the code at different stages
10+
of execution.
11+
612

713
The name "Rebugger" has 3 meanings:
814

915
- it is a [REPL](https://docs.julialang.org/en/latest/stdlib/REPL/)-based debugger (more on that below)
1016
- it is the [Revise](https://github.com/timholy/Revise.jl)-based debugger
11-
- it supports repeated-execution "surface" debugging
12-
13-
Rebugger is an unusual debugger with a novel work-flow paradigm.
14-
With most debuggers, you enter some special mode that lets the user "dive into the code,"
15-
but what you are allowed to do while in this special mode may be limited.
16-
In contrast, Rebugger brings the code along with its input arguments to the user,
17-
presenting them both for inspection, analysis, and editing in the (mostly) normal Julia
18-
interactive command line.
19-
As a consequence, you can:
20-
21-
- test different modifications to the code or arguments without being forced to exit debug mode
22-
and save your file
23-
- run the same chosen block of code repeatedly (perhaps with different modifications each time)
24-
without having to repeat any of the "setup" work that might have been necessary to get to some
25-
deeply nested method in the original call stack.
26-
In other words, Rebugger brings "internal" methods to the surface.
27-
- run any desired command that helps you understand the nature of a bug.
28-
For example, if you've already loaded `MyFavoritePlottingPackage` in your session,
29-
then when debugging you can (transiently) add `Main.MyFavoritePlottingPackage.plot(x, y)`
30-
as a line of the method-body you are currently analyzing, and you should see a
31-
plot of the requested variables.
32-
33-
Rebugger exploits the Julia REPL's history capabilities to simulate the
34-
stacktrace-navigation features of graphical debuggers.
35-
Thus Rebugger offers a command-line experience that is more closely aligned with
36-
graphical debuggers than the traditional `s`, `n`, `up`, `c` commands of a console debugger.
17+
- it supports repeated-execution debugging
3718

3819
## Installation
3920

@@ -74,9 +55,9 @@ in your Terminal settings to avoid the need to press Esc before each Rebugger co
7455

7556
#### Ubuntu
7657

77-
The default meta key on Ubuntu is left Alt, which is equivalent to Esc Alt on the default
58+
The default meta key on some Ubuntu versions is left Alt, which is equivalent to Esc Alt on the default
7859
Gnome terminal emulator.
7960
However, even with this tip you may encounter problems because Rebugger's default key bindings
8061
may be assigned to activate menu options within the terminal window, and
8162
[this appears not to be configurable]( https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1113420).
82-
As a consequence Ubuntu users will very likely need to [Customize keybindings](@ref).
63+
Affected users may wish to [Customize keybindings](@ref).

0 commit comments

Comments
 (0)