Build, run and debug your API and workers
Start the API and the workers beside it with one click, watch every call the API answers, and see the lines a request ran, in Kotlin, Java, TypeScript, Python, Go or Rust.
Before you start
- The services’ own tools on your Mac: a JDK, Node, a Python environment, Go or Rust. The build panel’s Status says what each one is missing.
- No model. Building, running, Live wire and debugging never call one.
At a glance#
A panel per build tool: Gradle, Maven, npm, Python, Go, Cargo. The build graph says what a change rebuilds.
The API and each worker as runners, started together as a group, every log in Superlog.
Breakpoints replayed with real values on the JVM; the Tracer for JVM, Node, Python and Go.
Build#
Each build tool the backend uses gets a button on the right edge and a panel of its own: Gradle and Maven’s tasks and modules, npm’s scripts and packages, Cargo’s crates, Go’s modules, Python’s packages. Double-click a task to run it.
- ⌘⇧B builds the open file’s project; each error opens at its line.
- Status says what each service runs on (JDK 21, Go 1.23…) and what it lacks, each with a fix one click away.
- Build graph shows which services depend on a shared module, and how many build again when it changes.
The Build systems guide covers every panel.
Run the API and its workers#
- Find them.
Open the Run panel (⌥R). Found in this folder offers each service’s start: Gradle’s run task, a
package.jsonscript, a Python web framework’s server, each Gomainpackage, each Cargo binary, a Compose file’s services. - Make them a group.
New group…, name it (Backend), tick the API, the workers and the queue or database they need. Run Backend starts them all; Stop Backend ends every one.
- Read them as one.
All runners opens Superlog: the API’s request lines and the worker’s jobs in the order they happened. Search an order id to follow it from one to the other.
The API
An API is a runner that listens on a port. Open Live wire and each call it answers travels on the picture from its caller to the endpoint (GET /orders/{id}), with its status. Open a call to read its request and response whole, and Replay it.
The workers
A worker listens on nothing once it settles, and Live wire draws it as one. A queue, a database or a cache is drawn by the product its command names or its usual port (ElasticMQ for SQS, Kafka, RabbitMQ, PostgreSQL, Redis), so the picture shows the whole backend before any call. Stats on a runner shows each process’s CPU and memory live.
# Name: Worker (local)
SPRING_PROFILES_ACTIVE=local ./gradlew :worker:bootRunDebug a request#
Three tools, by what your service is written in:
| Written in | Breakpoints, replayed | Tracer: which lines ran |
|---|---|---|
| Java, Kotlin | Yes | Yes, attached to a running JVM |
| TypeScript, JavaScript (Node) | Not yet | Yes, main thread |
| Python | Not yet | Yes, 3.12 and newer |
| Go | Not yet | Yes, each goroutine a lane |
| Rust | Not yet | Not yet |
For any of them, a stack frame in the logs opens its line, and a walkthrough steps through a function without running it.
Java and Kotlin: replay a breakpoint
Set a breakpoint (⌘F8), right-click the API’s runner and choose Debug, and send the request. The editor plays the function back with the values the run had at each line end, forwards and backwards; your API waits only the milliseconds the walk takes. See the AI debugger. Or open the Tracer in Explore, give it the packages to record (com.shop.*) and pick the running JVM: a request is followed through controller, service and repository without a restart.
Node, Python and Go: follow the lines a request runs
Open the Tracer in Explore. Under Start a program with its recorder, type the command that starts your service, and the Tracer puts its recorder in front of it. Send a request and the editor goes through each line it ran, across files, in order, out to the catch, except or recover that handled an error. Nothing is installed in your project.
Python: where the time goes
On a running Python runner, Stats › Run with Python profiling lists the busiest functions as they run.
Current limits#
- Picking one request to follow isn’t built: the Tracer’s lanes are threads (goroutines in Go).
- Live wire sees calls into an API started from the Run panel, over HTTP/1.1 on your Mac. The calls your backend makes onward (to its database, to other services) aren’t drawn yet.
- Breakpoint debugging is JVM only for now.
Next steps#
Something unclear or out of date? Tell us; a person on the team reads every note.