Fundamentals 7 min read

Debugging Linux 0.11 on Windows with VSCode Remote and QEMU

This guide shows how to set up an Ubuntu 16.04 virtual machine on Windows, install QEMU, fetch a modernized Linux 0.11 source tree, and use VSCode Remote‑SSH together with GDB to debug the historic kernel without rebuilding outdated toolchains.

ITPUB
ITPUB
ITPUB
Debugging Linux 0.11 on Windows with VSCode Remote and QEMU

Overview

Linux 0.11 is an early Linux kernel source useful for studying operating‑system fundamentals. It cannot be built with modern toolchains because it relies on the obsolete a.out format. The workflow runs the kernel inside QEMU on an Ubuntu 16.04 virtual machine and debugs from the host Windows machine via VSCode Remote‑SSH and GDB.

Step 1 – Configure the VM

Create an Ubuntu 16.04.7 desktop VM (amd64) using Oracle VM VirtualBox 6.0.8. Install the ISO from the Ubuntu releases page.

Step 2 – Install QEMU

Inside the Ubuntu VM run:

sudo apt-get update
sudo apt-get install qemu

Verify that qemu-system-x86_64 is available.

Step 3 – Obtain a debug‑ready Linux 0.11 source

Clone the community‑maintained repository that patches the code for modern compilers:

https://github.com/yuan-xy/Linux-0.11

In the top‑level directory run: make start This boots Linux 0.11 in QEMU. For debugging use: make debug The make debug target starts QEMU with a GDB server listening on port 1234.

Step 4 – Remote debugging with VSCode

Install Visual Studio Code on Windows and add the Remote‑SSH extension. Connect to the Ubuntu VM via its IP address, username and password. Open the Linux 0.11 source folder and create .vscode/launch.json with the following configuration:

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "(gdb) Launch",
      "type": "cppdbg",
      "request": "launch",
      "program": "${workspaceFolder}/tools/system",
      "miDebuggerServerAddress": "127.0.0.1:1234",
      "args": [],
      "stopAtEntry": false,
      "cwd": "${workspaceFolder}",
      "environment": [],
      "externalConsole": false,
      "MIMode": "gdb"
    }
  ]
}

Start the kernel in debug mode inside the VM ( make debug), then in VSCode choose Run → Start Debugging . The debugger attaches to the QEMU‑hosted kernel, allowing breakpoints, step‑by‑step execution, and inspection of kernel state.

Alternative command‑line debugging

If you prefer a terminal, run GDB inside the VM and connect to the same server:

gdb tools/system
target remote :1234

Conclusion

The described setup isolates the heavy build and emulation inside an Ubuntu VM while providing a responsive host UI for editing and debugging. The same method can be applied to a remote server to avoid consuming local resources.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxOperating SystemsVSCodegdbQEMUkernel debuggingVirtualBox
ITPUB
Written by

ITPUB

Official ITPUB account sharing technical insights, community news, and exciting events.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.