Without the log service
Where to read output without the log service: background commands' logs, containers, connections to private addresses, and a browser's console in your own tests.
- A
background: truecommand returns itslogPath,/work/.sbx/logs/<bgId>.log:sandbox_exec { "id": "<id>", "cmd": "tail -n 100 /work/.sbx/logs/<bgId>.log", "note": "read the dev server output" }.sandbox_status.running.backgroundlists running ones withlogPath, andrunning.containersthe containers with their ports.sandbox_procswithaction: "list"returns every background command, finished ones included, with the end of its log (up to the last 16 KB) aslogTail. - Containers:
docker compose logs --tail 100 <service>ordocker logs --tail 100 <container>throughsandbox_exec. - Connections to an environment's private addresses:
/work/.sbx/logs/private-endpoints.log, one line per failure. - The box does not capture a browser's console or network traffic. Tests you run can listen for them and print them, for example with Playwright:
page.on('console', m => console.log(m.type(), m.text())),page.on('pageerror', e => console.log(e.message)),page.on('requestfailed', r => console.log(r.url(), r.failure()?.errorText)). For a page a person has open at one of the box's URLs,sandbox_scenereads its state;sandbox_shotshows the box's screen.
Every tool and topic is listed in the tool reference.