webdelve is a web service that provides an online debugging environment for Go programs. It allows to run and debug Go code directly from browser using the delve server running in isolated docker containers.
demo.mp4
- web-based debugging - debug go code from any browser
- prometheus metrics - monitor performance and usage
- websocket communication - real-time debugger interaction
- code formatting - automatic go code formatting
| Command | Description | Arguments |
|---|---|---|
continue |
Resume execution | - |
next |
Step over | - |
step |
Step into | - |
stepout |
Step out | - |
break |
Set breakpoint | file, line |
clear |
Remove breakpoint | id |
stack |
Show stack trace | goroutineId, depth |
locals |
Show local variables | goroutineId, frame |
goroutines |
List all goroutines | - |
state |
Get debugger state | - |
restart |
Restart program | - |
- Docker with gVisor runtime (runsc)
- Make (optional)
Builds both images (for sandbox and service), then runs everything in containers.
make docker-runService will be available at address specified in config.yaml.
Stop with make docker-stop.
Requires the sandbox Docker image to be built once.
# Build the sandbox image
docker build -f Dockerfile.sandbox -t webdelve-sandbox:latest .
# Build and run the service binary locally
make runThe service will use your local Docker daemon to create sandbox containers from the webdelve-sandbox:latest image.
curl -X POST http://localhost:8080/build \
-H "Content-Type: application/json" \
-d '{"code": "package main\n\nfunc main() {\n println(\"Hello\")\n}"}'Response:
{
"session_id": "550e8400-e29b-41d4-a716-446655440000",
"formatted": "package main\n\nfunc main() {\n\tprintln(\"Hello\")\n}\n"
}const ws = new WebSocket("ws://localhost:8080/ws/550e8400...");
ws.send(JSON.stringify({ command: "continue" }));
ws.send(JSON.stringify({ command: "break", args: { file: "main.go", line: 4 } }));Prometheus metrics available at http://localhost:8080/metrics:
http_requests_totalbuild_duration_secondsbuild_errors_totalsandbox_idleactive_sessionsdebug_command_duration_seconds
- Multi‑file programs – Allow uploading multiple
.gofiles. (or txtar format). - Rate limiting – Per‑IP limits on build requests and debug commands.
- Improved frontend - Current frontend uses pure js and therefore hard to mantain