CodeLab: Runnable Program Examples in the VS Code Editor
Insert program examples in 27 languages (including C, C++, Python, Java, C#, JavaScript, TypeScript, Go, Rust, SQL and HTML/CSS/JS) into any Moodle text, edit them in Monaco and run them on Jobe, on the CodeLab runner or in the browser.
Live demo: try CodeLab on codelab.tsp.edu.rs as a guest (Python runs in the browser), or sign in with teacher or student (password Demo-2026) for every language, the debugger and SQL. Reset nightly.
What's New in v1.25.1
- Debugging across C/C++ files: breakpoints in companion source and header files on CodeLab runner 0.21.0+, Step opens the tab of the file that runs next, and the stack shows the file and line of every frame.
- Fixed: a pause in the main program is no longer skipped while a shorter companion file tab is shown.
- Also in 1.25: conditional breakpoints and watch expressions in the debugger, in all 29 interface languages.
Core features
- VS Code editor: Monaco with syntax highlighting, search, multi-file tabs, zoom, word wrap, full screen, and tooltips with variable values and beginner help.
- Typing help and error help: code completion and program templates for every language (Jedi for Python), instant explanations for 40 common GCC and Clang errors, and optional AI explanations through Moodle's AI subsystem.
- Jobe or CodeLab runner: choose the execution server, with GCC, Clang or MSVC compatibility mode for C/C++, per-user limits and a server test page.
- Interactive runs and Python in the browser: live terminal input on the CodeLab runner (with Safe mode for C/C++) or in-browser Python via Pyodide with turtle graphics.
- SQL and files: MySQL examples with a hidden setup of tables on the CodeLab runner; up to 5 input files per example, and files the program writes appear under the console.
- Debugger and Memory view: breakpoints and conditional breakpoints, Watch expressions, Step over and out, call stack, call tree, step back timeline, pointer arrows down linked lists to NULL, and heap leak warnings.
- Complexity and Flowchart bridge: measure Python step growth against n, n log n and n², and exchange Python programs with the Algorithm flowchart plugins.
- Themes, accessibility and phones: Light, Dark and High Contrast themes, reduced motion, screen reader announcements and mobile-friendly input.
The CodeLab plugins
Requirements
- Moodle: 4.5 LTS to 5.3.
- Execution server: Jobe or the open-source CodeLab runner (github.com/blagojevicboban/codelab-runner). Browser Python needs Chrome or Edge 137+ and works without a server.
- Hosted runner (optional): paid monthly quota plan by Boban Blagojević (boban.blagojevic@tsp.edu.rs). Not required.
- CodeLab filter: install and enable it in Site administration, Plugins, Filters, Manage filters.
Privacy
Programs and input are sent to the configured Jobe or CodeLab runner server to compile and run; interactive sessions use a short-lived signed token with only the numeric user id and keep nothing after exit. Browser Python loads Pyodide from the configured URL without sending code. Optional AI explanations use Moodle's AI subsystem. Implements the Moodle Privacy API.
Developed by Boban Blagojević. 29 languages: en, sr_lt, sr_cr, de, fr, es, it, pt, pt_br, pl, hr, bs, sl, mk, sk, cs, tr, nl, ru, uk, ro, hu, bg, el, sq, ja, zh_cn, ko, ar. Bundles Monaco Editor (MIT).
Source and issues: github.com/blagojevicboban/moodle-tiny_codelab
Licensed under the GNU GPL v3 or later.