A debugger you can rewind
Online GDB Pro records every line your program runs. Step forward with next, step and finish, or go back with reverse-next and reverse-step to see the moment a value went wrong.
FREE · NO SIGN-UP · RUNS IN YOUR BROWSER
Write TypeScript and run it at once: types are stripped in your browser and the program runs in an isolated worker. Set breakpoints on the TypeScript lines you wrote and step through them with the debugger.
// Set a breakpoint by clicking a line number, then press Debug.
interface Student {
name: string;
scores: number[];
}
function average(student: Student): number {
let total = 0;
for (const n of student.scores) {
total += n;
}
return total / student.scores.length;
}
const ada: Student = { name: prompt("Your name: ") ?? "Ada", scores: [72, 88, 95] };
console.log(`Hello, ${ada.name}! Average score: ${average(ada).toFixed(1)}`);
Click a line number to set a breakpoint. Ctrl+Enter runs, F5 debugs.
Press Run to see the output here.
QUICK ANSWER
Online GDB Pro is a free online compiler and debugger for C, C++, Python, Java, JavaScript, TypeScript and SQL. Type or paste a program and press Run: it compiles and runs right in your browser, and the interactive terminal asks for input when the program reads it, so there is no queue and nothing to install. Press Debug to step through the same program like in GDB: set breakpoints, step into and over functions, finish, continue, go back in time with reverse stepping, and watch every variable and the call stack change line by line.
Updated November 28, 2026. How to use GDB online
HOW IT WORKS
Pick one of seven languages. Start from the example or paste your own program; it is saved in this browser as you type.
Press Run. When the program reads input, type it in the terminal and press Enter, or fill the Input box first. Compiler errors point to the exact line.
Click line numbers to add breakpoints and press Debug. Step through the program, inspect variables and the call stack, and use the GDB console for commands.
GDB COMMANDS
Use the buttons, the keyboard (F5 debug, F10 next, F11 step, Shift+F11 finish, F8 continue) or type commands in the GDB console.
| Command | Short | What it does |
|---|---|---|
break 12 | b | Stop before line 12 (or click the line number) |
run | r | Start and stop at the first breakpoint |
next | n | Run one line, stepping over calls |
step | s | Run one line, stepping into calls |
finish | fin | Run until the current function returns |
continue | c | Run to the next breakpoint |
reverse-next | rn | Go back one line |
print total | p | Show a variable, field or element |
watch total | | Run until a variable changes |
backtrace | bt | Show the call stack |
info locals | i lo | List local variables |
WHY ONLINE GDB PRO
Online GDB Pro records every line your program runs. Step forward with next, step and finish, or go back with reverse-next and reverse-step to see the moment a value went wrong.
C and C++ compile with Clang 22 (C89 to C23, C++11 to C++23), Python runs on CPython 3.13, Java on javac 25, plus JavaScript, TypeScript and SQLite. Your code never leaves your device to be run.
Click a line number for a breakpoint, or type break, next, step, print, watch, backtrace and info locals in the GDB console. Every variable and the call stack update at each step.
WHAT YOU GET
What Online GDB Pro runs, how the debugger works and what it costs.
COMPARISON
| Feature | Online GDB Pro | OnlineGDB | Programiz | Python Tutor |
|---|---|---|---|---|
| Where your code runs | In your browser (WebAssembly); never uploaded | On the service’s servers | On the service’s servers | On the service’s servers |
| Step-by-step debugger | C, C++, Python, JavaScript, TypeScript | GDB for C and C++; Python debugging not yet supported | Visualize mode for some languages | Visualizer for all its languages |
| Step backwards (reverse debugging) | Yes, every language with the debugger | Not stated | Not stated | Yes |
| Interactive input | Yes, an interactive terminal | Yes, interactive console | Yes | Limited |
LEARN TO CODE
PRICING
Running, debugging and lessons are free with no sign-up. VIP removes ads and raises the run-time and debugger limits.
Free: 15 s runs and 20,000 debugger steps. VIP: 120 s and 300,000 steps.
See VIP pricing →GUIDES
Online C++ CompilerOnline C CompilerOnline Python CompilerOnline Java CompilerOnline JavaScript CompilerOnline SQL Compiler
FAQ
No. Types are stripped so the program runs immediately, as tsx and ts-node --transpile-only do. Type errors that would not change the program do not stop it.
Yes. Breakpoints and the current line use the TypeScript lines you wrote, and the Variables panel shows every local at each step.
The same as in JavaScript: prompt(), readline or fs.readFileSync(0) read the Input box and then the interactive console.
Yes. Running, debugging and all lessons are free with no sign-up. Free pages show ads. VIP ($4.99 a month or $29.99 a year) removes ads and raises the limits to 120-second runs and 300,000 debugger steps.
No. Your code is compiled and run in your browser and saved in this browser’s storage so you can come back to it. Online GDB Pro does not receive your code to run it.
Programs stop after 15 seconds and the debugger records up to 20,000 steps, which usually means an infinite loop. Debug it to see where it repeats. VIP raises the limits to 120 seconds and 300,000 steps.
Online GDB Pro is an independent tool. It is not affiliated with, endorsed by or sponsored by the GNU Project, the Free Software Foundation or OnlineGDB. GDB is a GNU Project debugger.