Event-based Out-of-place Debugging

Tom Lauwaerts, Carlos Rojas Castillo, Robbert Gurdeep Singh, Matteo Marra, Christophe Scholliers, Elisa Gonzalez Boix

Event-based Out-of-place Debugging

Tom Lauwaerts, Carlos Rojas Castillo, Robbert Gurdeep Singh, Matteo Marra, Christophe Scholliers, Elisa Gonzalez Boix

Challenges of Debugging Microcontrollers

How to debug a microcontroller?

Challenges of Debugging Microcontrollers

How to debug a microcontroller?

Challenges of Debugging Microcontrollers

How to debug a microcontroller?

Current Practices

74% of surveyed participants say that IoT developers rely on access to devices to test and debug.

95% of surveyed participants rely at least in some degree on manual testing when developing IoT applications.

Makhshari A., Mesbah A. (2021). IoT Bugs and Development Challenges. ICSE '21

Current Practices

74% of surveyed participants say that IoT developers rely on access to devices to test and debug.

95% of surveyed participants rely at least in some degree on manual testing when developing IoT applications.

Makhshari A., Mesbah A. (2021). IoT Bugs and Development Challenges. ICSE '21

A Device Issue

A Device Issue

import * as wd from warduino;
const LED: u32 = 25; const BUTTON: u32 = 26;

function buttonPressed(): void {
wd.digitalWrite(LED, !wd.digitalRead(LED));
}

export function main() : void {
wd.interruptOn(BUTTON, wd.FALLING, buttonPressed);
while(true);
}

An Inconspicuous Bug

A Device Issue

import * as wd from warduino;
const LED: u32 = 25; const BUTTON: u32 = 26;

function buttonPressed(): void {
const current: u32 = wd.digitalRead(LED);
wd.print(`Entered callback: LED = ${current}`)
wd.digitalWrite(LED, !current);
}

export function main() : void {
wd.interruptOn(BUTTON, wd.FALLING, buttonPressed);
while(true);
}

Traditional Remote Debugging

Remote debugging schematically.

Gurdeep Singh, R., & Scholliers, C. (2019). WARDuino: A Dynamic WebAssembly Virtual Machine for Programming Microcontrollers.

Traditional Remote Debugging

Remote debugging schematically (setup).

Gurdeep Singh, R., & Scholliers, C. (2019). WARDuino: A Dynamic WebAssembly Virtual Machine for Programming Microcontrollers.

Traditional Remote Debugging

Remote debugging schematically (flash).

Gurdeep Singh, R., & Scholliers, C. (2019). WARDuino: A Dynamic WebAssembly Virtual Machine for Programming Microcontrollers.

Traditional Remote Debugging

Remote debugging schematically.

Gurdeep Singh, R., & Scholliers, C. (2019). WARDuino: A Dynamic WebAssembly Virtual Machine for Programming Microcontrollers.

Traditional Remote Debugging

Remote debugging schematically.

Gurdeep Singh, R., & Scholliers, C. (2019). WARDuino: A Dynamic WebAssembly Virtual Machine for Programming Microcontrollers.

The Advantages

Remote debugging offers:

Gurdeep Singh, R., & Scholliers, C. (2019). WARDuino: A Dynamic WebAssembly Virtual Machine for Programming Microcontrollers.

The Disadvantages

Debugger runs on constraint devices.

Gurdeep Singh, R., & Scholliers, C. (2019). WARDuino: A Dynamic WebAssembly Virtual Machine for Programming Microcontrollers.

The Disadvantages

Debugger runs on constraint devices.
Each debug operation requires communication with a remote device.

Gurdeep Singh, R., & Scholliers, C. (2019). WARDuino: A Dynamic WebAssembly Virtual Machine for Programming Microcontrollers.

Out-of-place Debugging

Out-of-place debugging paper.

Marra, M., Polito, G., & Gonzalez Boix, E. (2018). Out-of-place debugging: A debugging architecture to reduce debugging interference. The Art, Science, and Engineering of Programming

Out-of-place Debugging

Pharo out-of-place debugger. Pharo out-of-place debugger.

Marra, M., Polito, G., & Gonzalez Boix, E. (2018). Out-of-place debugging: A debugging architecture to reduce debugging interference. The Art, Science, and Engineering of Programming

Bringing Out-of-place Debugging to Microcontrollers

Out-of-place Debugging

Move debugging process to the desktop environment.

Out-of-place Debugging

Move debugging process to the desktop environment.

Remote + Local Debugging

Move debugging process to the desktop environment.

Non-transferable Resources

Non-transferable resources cannot be moved to the desktop environment.

Distinquishing Non-transferable Resources

Distinquishing nontransferable resources.

Distinquishing Non-transferable Resources

Distinquishing nontransferable resources.

Distinquishing Non-transferable Resources

Distinquishing nontransferable resources.

Distinquishing Non-transferable Resources

Distinquishing nontransferable resources.

A PROTOTYPE: EDWARD

Capturing a Debug Session

Capturing a remote debugging session.

Pull-based Resources

Pull-based remote debugging.

Push-based Resources

Push-based remote debugging.

Requirements

To implement a out-of-place debugger you need a vm that can:

EDWARD: Debugger Frontend

The vscode WARDuino plugin

Demo on thursday:
demo session II (11:00 - 11:30)

Benchmarks

Conclusion

Overview of the paper.