Z
Zerops2mo ago
wrl

debugging builds

i've got a build that only fails (on a missing dependency) after ~2-3 minutes, and it would be really convenient to be able to ssh in to the build worker to figure out what dependency i need in order for the build to proceed. it's getting pretty old making a single change to the zerops.yml, zcli push, waiting 3 and a half minutes, another build failure, make a single change to zerops.yml, etc etc...
3 Replies
Jan Saidl
Jan Saidl2mo ago
Hi @wrl, this is certainly annoying. It's possible to set the build to debug mode. It's possible to configure the build to stop: * before the first command * after the last command * or only if any command fails Then you can use the web terminal and inspect the container. More details are described here: https://docs.zerops.io/features/debug-mode#debug-control The build can remain stopped for up to one hour, after which the build itself will timeout. The setting is valid for the service, so it needs to be turned off after the build completes.
No description
No description
wrl
wrlOP2mo ago
ah, and the web terminal gives me shell access?
Jan Saidl
Jan Saidl2mo ago
Yes, you can go through the web terminal, which is the easiest way. Alternatively, use VPN (WireGuard) and then SSH from your computer. https://docs.zerops.io/references/vpn After finishing debugging, you can move the process forward using the zsc command directly in the container:
workers-runtime-3-159:/var/www$ zsc debug
group of debugger commands

Usage:
zsc debug [command]

Aliases:
debug, d

Available Commands:
continue debugger continue
fail debugger fail
success debugger success
workers-runtime-3-159:/var/www$ zsc debug
group of debugger commands

Usage:
zsc debug [command]

Aliases:
debug, d

Available Commands:
continue debugger continue
fail debugger fail
success debugger success
If you use SSH or web terminal, you always have the same environment variables as the running process. A good approach is to run commands manually in the terminal and adjust the zerops.yaml accordingly. This is faster than trying to figure everything out before deployment.

Did you find this page helpful?