Skip to content

V1.0.0 beta 17OSS

Dr. Rocket is a Racket IDE written in Rust. It runs every DrRacket language level, steps through code exactly like DrRacket’s stepper, and adds a Visualizer that draws your program as it runs.

Requires Racket: get it at racket-lang.org. Free for macOS, Windows and Linux.

ISL
CS135
a03
grades.rkt
squares.rkt
README.md
4
1;; average : (listof Number) -> Number
2;; the mean of a non-empty list of marks
3(define (average marks)
4 (/ (total marks) (length marks)))
5​
6;; total : (listof Number) -> Number
7(define (total marks)
8 (cond [(empty? marks) 0]
9 [else (+ (first marks) (total (rest marks)))]))
10​
11(check-expect (total (list 80 90 70)) 240)✓ passed
12(check-expect (average (list 80 90 70)) 80)✓ passed
13​
14;; letter : Number -> String
15;; the letter grade for a mark out of 100
16(define (letter mark)
17 (cond [(>= mark 80) "A"]
18 [(>= mark 70) "B"]
19 [(>= mark 60) "C"]
20 [else "F"]))
21​
22(check-expect (letter 92) "A")✓ passed
23(check-expect (letter 64) "C")✓ passed
24​
25(define marks (list 92 78 85 64))
26(average marks)
27(map letter marks)
28​
Interactions
Welcome to Racket 9.3
Language: Intermediate Student
79.75
(list "A" "B" "A" "C")
All 4 tests passed
(letter 71)
"B"
(total marks)
319
cs135a03grades.rktLn 1, Col 1Racket 9.3
Simulated preview
raco test a03/grades.rkt
raco test: (submod (file "a03/grades.rkt") test)
79.75
(list "A" "B" "A" "C")
All 4 tests passed!
racket notes/scratch.rkt
'(("the" . 2) ("and" . 1) ("hat" . 1) ("cat" . 1))
Simulated preview

Same Racket underneath.
A modern editor on top.

DrRacket is the reference, and Dr. Rocket runs Racket’s own stepper, check syntax, debugger and test engine under the hood. What’s new is everything around them: a GPU-rendered editor, a file tree, tabs, a command palette, integrated terminals and themes.

Windows download
12.2 MB
Universal Mac app, Apple Silicon and Intel
24 MB
language levels, plus any #lang
11
free, with no account to make
$0

Watch your
program think.

Run a program and replay it one step at a time. Every call gets a frame, trees and lists are drawn as real diagrams, and each step is explained in plain words while its code lights up in the editor.

cs135
bst.rkt
1(define-struct node (key left right))
2;; A BST is one of:
3;; - empty
4;; - (make-node Number BST BST)
5​
6;; insert : Number BST -> BST
7(define (insert k t)
8 (cond [(empty? t) (make-node k empty empty)]
9 [(< k (node-key t))
10 (make-node (node-key t)
11 (insert k (node-left t))
12 (node-right t))]
13 [else
14 (make-node (node-key t)
15 (node-left t)
16 (insert k (node-right t)))]))
17​
18;; tree-sum : BST -> Number
19(define (tree-sum t)
20 (cond [(empty? t) 0]
21 [else (+ (node-key t)(node-key t) → 4
22 (tree-sum (node-left t))t = empty
23 (tree-sum (node-right t)))]))
24​
25(define tree (foldl insert empty (list 5 3 8 1 4 9)))
26(tree-sum tree)
27​
82%
CALL(tree-sum (node-left t))

tree-sum calls itself

t is empty, which was t's left in the previous call

When it returns, tree-sum goes on with (+ 4 ••• (tree-sum (node-right t)))

cs135 › a05 › bst.rkt › ƒx nodeLn 1, Col 1Racket 9.3
Simulated preview
  • Frames for every call

    Arguments and locals for each call. Tail calls replace their caller’s frame, as Racket runs them.

  • Trees and lists, drawn

    Structs that point to their own type become trees, cons cells become chains, and both glide as they change.

  • Explained in plain words

    “Is k less than t’s key? Yes.” Each step says what happened and why, in words, so recursion stops being magic.

A stepper that matches DrRacket,
step for step.

See every reduction before and after, mirrored in your source. Dr. Rocket drives DrRacket’s own stepper, so you get the same steps your course notes show, cons chains printed as lists, images drawn inline, all the way to the final value.

1;; sum-squares : (listof Number) -> Number
2;; adds up the square of every number in the list
3(define (sum-squares lon)
4 (cond [(empty? lon) 0]
5 [else (+ (sqr (first lon))
6 (sum-squares (rest lon)))]))
7​
8(check-expect (sum-squares (cons 1 (cons 2 empty))) 5)
9​
10(sum-squares (cons 3 (cons 4 empty)))
11​
reduction
BEFORE
(define (sum-squares lon)
  (cond
    ((empty? lon) 0)
    (else (+ (sqr (first lon)) (sum-squares (rest lon))))))
(cond
 (else
  (+
   (sqr (first (list 3 4)))
   (sum-squares (rest (list 3 4))))))
AFTER
(define (sum-squares lon)
  (cond
    ((empty? lon) 0)
    (else (+ (sqr (first lon)) (sum-squares (rest lon))))))
(+ (sqr (first (list 3 4))) (sum-squares (rest (list 3 4))))
Ln 1, Col 1Racket 9.3
Simulated preview

Binding arrows, rename
and a real debugger.

Check syntax runs in the background: arrows from each binding to its uses, unused bindings, hover info, rename and go to definition across files. Set breakpoints in the gutter and step into, over and out with locals and the call stack. The profiler, test coverage and macro stepper are here too.

1(define-struct node (key left right))
2;; A BST is one of:
3;; - empty
4;; - (make-node Number BST BST)
5​
6;; insert : Number BST -> BST
7(define (insert k t)
8 (cond [(empty? t) (make-node k empty empty)]
9 [(< k (node-key t))
10 (make-node (node-key t)
11 (insert k (node-left t))
12 (node-right t))]
13 [else
14 (make-node (node-key t)
15 (node-left t)
16 (insert k (node-right t)))]))
17​
18;; tree-sum : BST -> Number
19(define (tree-sum t)
20 (cond [(empty? t) 0]
21 [else (+ (node-key t)
22 (tree-sum (node-left t))
23 (tree-sum (node-right t)))]))
24​
25(define tree (foldl insert empty (list 5 3 8 1 4 9)))
26(tree-sum tree)
27​
VARIABLES
  • '()
  • insert
  • tree-sum
  • (make-node 5 (make-node 3 (make-node 1 '() '()) (make-node 4 '() '())) (make-node 8 '() (make-node 9 '() '())))
CALL STACK
Simulated preview
Check syntax arrows from the parameter marks to its three uses, with a tooltip reading 3 bound occurrences.

Your DrRacket files,
pasted images and all.

Files saved by DrRacket open with their images inline, run with real images, and save back in DrRacket’s format, so you can switch back at any time. Paste images straight from the clipboard, or use Insert Image.

cs135BSL
CS135
a03
grades.rkt
poster.rkt
squares.rkt
README.md
1(require 2htdp/image)
2​
3;; a picture pasted straight into DrRacket
4(define rocket )
5​
6;; poster : String -> Image
7(define (poster title)
8 (above rocket
9 (overlay (text title 16 "white")
10 (rectangle 140 34 "solid" "navy"))))
11​
12(poster "Launch day")
13(beside rocket rocket rocket)
14​
Interactions
Welcome to Racket 9.3
Language: Beginning Student
No tests
BSL
cs135a03poster.rktLn 1, Col 1Racket 9.3
Simulated preview

Every course in a tab,
a terminal one keystroke away.

Keep each course open as a project tab with its own files and layout. Run raco in an integrated terminal, search the whole project, jump to any file with ⌘P and reach every command from the palette.

#lang racket
CS135
notes
scratch.rkt
README.md
1#lang racket
2​
3;; Count the words in a string, most frequent first.
4(define (word-counts text)
5 (define words (string-split (string-downcase text)))
6 (define counts
7 (for/fold ([h (hash)]) ([w (in-list words)])
8 (hash-update h w add1 0)))
9 (sort (hash->list counts) > #:key cdr))
10​
11(word-counts "the cat and the hat")
12​
raco test a03/grades.rkt
raco test: (submod (file "a03/grades.rkt") test)
79.75
(list "A" "B" "A" "C")
All 4 tests passed!
racket notes/scratch.rkt
'(("the" . 2) ("and" . 1) ("hat" . 1) ("cat" . 1))
Interactions
Welcome to Racket 9.3
Language: #lang racket
'(("the" . 2) ("and" . 1) ("hat" . 1) ("cat" . 1))
cs135notesscratch.rktLn 1, Col 1Racket 9.3
Simulated preview

Zed-grade themes,
set in Fira Code.

The default, Moiz One Dark, matches Zed’s One Dark Darker exactly. One Light, GitHub Light, Catppuccin, Gruvbox, Tokyo Night and DrRacket’s own colours are built in, and every Zed theme you have installed shows up too. Code is set in Fira Code, with ligatures and rainbow brackets.

-> => >= <= != λ

ISL
CS135
a03
grades.rkt
squares.rkt
README.md
4
1;; average : (listof Number) -> Number
2;; the mean of a non-empty list of marks
3(define (average marks)
4 (/ (total marks) (length marks)))
5​
6;; total : (listof Number) -> Number
7(define (total marks)
8 (cond [(empty? marks) 0]
9 [else (+ (first marks) (total (rest marks)))]))
10​
11(check-expect (total (list 80 90 70)) 240)✓ passed
12(check-expect (average (list 80 90 70)) 80)✓ passed
13​
14;; letter : Number -> String
15;; the letter grade for a mark out of 100
16(define (letter mark)
17 (cond [(>= mark 80) "A"]
18 [(>= mark 70) "B"]
19 [(>= mark 60) "C"]
20 [else "F"]))
21​
22(check-expect (letter 92) "A")✓ passed
23(check-expect (letter 64) "C")✓ passed
24​
25(define marks (list 92 78 85 64))
26(average marks)
27(map letter marks)
28​
Interactions
Welcome to Racket 9.3
Language: Intermediate Student
79.75
(list "A" "B" "A" "C")
All 4 tests passed
(letter 71)
"B"
(total marks)
319
cs135a03grades.rktLn 1, Col 1Racket 9.3
Simulated preview

Every language level
your course uses.

Pick a level just as you would in DrRacket. Teaching-language files keep DrRacket’s header, so they open in either IDE, and output style, fraction style, tracing and teachpacks come along.

How to Design Programs

  • Beginning Student
  • Beginning Student with List Abbreviations
  • Intermediate Student
  • Intermediate Student with lambda
  • Advanced Student

DeinProgramm

  • Anfänger
  • Schreibe Dein Programm!
  • fortgeschritten

Racket

  • #lang racket, and any #lang
  • R5RS
  • Pretty Big
Choose Language
Every DrRacket language level. Teaching-language files stay compatible with DrRacket.
The Racket LanguageStart your program with #lang to choose a dialect, for example #lang racket
Beginning Studentdefine, cond, structs, constants, and primitives
Beginning Student with List AbbreviationsBeginner, with list style printing in the REPL
Intermediate StudentBeginner plus lexical scope
Intermediate Student with lambdaIntermediate plus higher-order functions
Advanced StudentIntermediate plus lambda and mutation
Schreibe Dein Programm! - AnfängerDefinitions, conditionals, records, and signatures
Schreibe Dein Programm!Anfänger plus higher-order functions and lists
Schreibe Dein Programm! - fortgeschrittenPlus quote, symbols, and mutation
R5RSScheme as described by the Revised5 Report
Pretty BigRacket plus the HtDP teachpacks (legacy)
Beginning Student
define, cond, structs, constants, and primitives
Input Syntax
Output Syntax
Fraction style
Teachpacks
Supports the algebraic stepper (⇧⌘E)
Simulated preview

Racket first,
then Dr. Rocket.

Dr. Rocket is the editor; Racket runs your programs. Any recent Racket works and we test with 9.3. If you have DrRacket, you already have it. Otherwise, get Racket at racket-lang.org.

  1. macOS

    Universal DMG, Apple Silicon and Intel · 24 MB

    1. Open Dr.Rocket-1.0.0-beta.17.dmg and drag Dr. Rocket into Applications.
    2. Open Dr. Rocket from Applications. It’s signed and notarized by Apple, so it opens like any other app.
    3. Uninstall DrRacket. Kidding. Dr. Rocket runs on the Racket that came with it, so keep it. Just stop opening it.
    Download for macOS
  2. Windows

    64-bit zip, no installer · 12.2 MB

    1. Unzip Dr.Rocket-1.0.0-beta.16-windows-x64.zip.
    2. Run Dr. Rocket.exe from the Dr. Rocket folder.
    3. If Windows says “Windows protected your PC”, the beta isn’t signed yet: click More info, then Run anyway.
    4. Uninstall DrRacket. Kidding. Dr. Rocket runs on the Racket that came with it, so keep it. Just stop opening it.
    Download for Windows
  3. Linux

    x64 tarball with a desktop entry · 12.7 MB

    1. Extract it: tar xzf Dr.Rocket-1.0.0-beta.16-linux-x64.tar.gz
    2. Run "Dr. Rocket/drrocket".
    3. For your app launcher, put drrocket on your PATH and copy drrocket.desktop to ~/.local/share/applications.
    4. Uninstall DrRacket. Kidding. Dr. Rocket runs on the Racket that came with it, so keep it. Just stop opening it.
    Download for Linux

Dr. Rocket finds Racket on its own. If it says “Racket not found”, set the path in Settings, then Racket.

Common questions

Do I need Racket installed?

Yes. Dr. Rocket is the editor, and Racket runs your programs, the stepper and check syntax. Any recent version works; we test with 9.3. If you have DrRacket, you already have Racket. Dr. Rocket looks for it on your PATH, in Homebrew, in /Applications/Racket* and in C:\Program Files\Racket. Otherwise, get it at racket-lang.org.

Does it open my DrRacket files?

Yes, including files with pasted images and comment boxes. They run with real images and save back in DrRacket’s format, so you can reopen them in DrRacket. A few rare boxes (XML boxes, Racket boxes, test-case boxes and large letters) make a file open read-only, so it’s never damaged.

Should I uninstall DrRacket?

Emotionally, yes. Technically, no: DrRacket and Racket are installed together, and Dr. Rocket needs that Racket to run your programs. Leave DrRacket where it is. It can sit there and think about what it’s done.

Is it free?

Yes. Dr. Rocket is free to download and use. It’s made by Moiz and John.

Does it run on Windows and Linux?

Yes: there’s a 64-bit Windows zip, a Linux x64 tarball and a universal Mac app. The full test suite runs on all three in CI. Most day-to-day use so far has been on macOS, so reports from Windows and Linux are especially welcome.

Why is Windows showing SmartScreen?

Because the Windows beta isn’t code-signed yet. Click More info, then Run anyway. You only need to do this once. The macOS app is signed and notarized by Apple, so it opens without any warning.

Does it work with my course’s language level?

If your course uses DrRacket’s teaching languages (Beginning Student through Advanced Student, or DeinProgramm) or #lang, yes: every level is there, with the same output and fraction settings and teachpacks. One caveat: DrRacket plugins, like a course’s handin Submit button, don’t run in Dr. Rocket, so submit the way your course allows outside DrRacket, or from DrRacket itself.

Is the stepper really the same as DrRacket’s?

It drives DrRacket’s own stepper, and we check it against DrRacket on the same files: step for step, including cons chains shown as lists and the closing step. As in DrRacket, Advanced Student, the advanced DeinProgramm level, R5RS and Pretty Big have no stepper.