Sign up free

Online Debugger for C, C++ and Python

See what your program does, line by line: how variables change, how functions call each other, where it goes wrong.

Online Debugger (C, C++, Python)

About Online Debugger (C, C++, Python)

This online debugger works with C, C++ and Python. Press Start debugging (F5) and the program runs once while every line, every function call and every variable's value is recorded; then you step through it: F10 steps over, F11 steps into a function, Shift+F11 steps out, and Shift+F10 steps back, or drag the timeline to any moment. Variables that change are highlighted, and arrays, structs, vectors, strings, lists, dictionaries and objects expand.

Click left of a line number to set a breakpoint and Continue stops at the next one; breakpoints take conditions such as i == 5, and watchpoints stop when a value changes. The console below takes the same commands as GDB: b 12, n, s, c, finish, p a[i], display, watch, bt, info locals, plus reverse commands such as rn and rc. C and C++ are compiled by Clang at -O0 with debugging information; Python is recorded with the interpreter's tracing. Write the program's input in the Input pane first. To simply run a program, use the Online C Compiler, the Online C++ Compiler or the Online Python Compiler.

How to use Online Debugger (C, C++, Python)

  1. 1
    Write the code

    Choose C, C++ or Python and write code or open an example.

  2. 2
    Set breakpoints

    Click left of a line number, then press F5 to start.

  3. 3
    Step through

    F10 and F11 to go forward, Shift+F10 to go back; watch the variables, the call stack and the output.

Why use Cubfile for this

  • Step backwards

    Every step is recorded, so you can go back or jump to any moment.

  • Conditions and watchpoints

    Breakpoints with conditions and ignore counts; watchpoints stop on a change.

  • Complex data made clear

    Arrays, structs, pointers, vectors, strings, lists and dictionaries expand.

  • GDB-style commands

    b, n, s, c, finish, p, display, watch, bt, info and more.

  • In your browser

    Your code isn't uploaded; works on computers and phones.

FAQ

Online Debugger (C, C++, Python): questions and answers

Which languages are supported?
C, C++ and Python. C and C++ are compiled with Clang before debugging; Python 3.14 is recorded by the interpreter in your browser.
How can it step backwards?
The debugger runs your program once and records the place, the variables and the output of every step, so stepping either way is moving through that record. Up to 20,000 steps by default; raise it in the Debug section.
Can I use GDB commands in the online debugger?
The common ones: break, next, step, continue, finish, until, print, display, watch, backtrace, frame, info locals and more, plus reverse-next and reverse-continue. Type help to see them all.
My program reads input. What do I do?
Write the input in the Input pane first, one item per line. Browsers that can pause a program also let you type it when asked.
What happens when I change the code?
You'll see that the code has changed; press Restart debugging to record the new code, keeping your step where possible.
Share Online Debugger (C, C++, Python) with a friendIt runs in any browser, and they can try it without signing up.

Related tools

C Online C CompilerCompile and run C with Clang in your browser: typed input, files, and checks that point at the line of a bug.
CPP Online C++ CompilerCompile and run C++11 to C++23 with Clang in your browser, with the standard library and <bits/stdc++.h>.
PY Online Python CompilerWrite and run Python 3.14 in your browser: typed input, files, turtle drawings and matplotlib charts, errors explained.
HTML HTML, CSS & JS Online EditorWrite HTML, CSS and JavaScript and see the page live, with a console, phone and tablet sizes and common libraries.
HTML HTML to Text ConverterTurn HTML into clean plain text, Markdown or CSV: keep the article only, list the links, convert tables, many files at once.
SEO Broken Link CheckerCheck every link on a page and list the ones that are broken or redirected.
DNS DNS LookupLook up A, AAAA, CNAME, MX, NS, TXT, SOA, CAA and other DNS records.
WEB Website Speed TestTime DNS, connection, first byte and download for a page, and see what slows it down.