Debugging
Execute a script asset on the ZeyOS platform and display execution results.
Bash
# Run a script asset
zeysdk run <ASSET_CLASS>/<FILENAME> [options]
# Run inline iXML (auto-wrapped in default iXML document)
zeysdk run --ixml '<output>hello</output>' [options]
# Run inline Zymba
zeysdk run --zymba '/* your code */' [options]
Parameters
| Parameter | Description | Required | Example |
|---|---|---|---|
ASSET_CLASS | Asset type (services, resources, weblets) | Yes (unless using --ixml/--zymba) | services |
FILENAME | Script file to execute | Yes (unless using --ixml/--zymba) | daily-backup.ixml |
Options
| Option | Description | Default |
|---|---|---|
--verbose | Show detailed execution progress and stack traces | false |
--clean | Print only console output (no metrics) | false |
--unpretty | Use simple metadata formatting for this run | false |
--ixml <code> | Run inline iXML (wrapped in default iXML document) | - |
--zymba <code> | Run inline Zymba code | - |
--zy <code> | Alias for --zymba | - |
| Execution Results |
The command outputs detailed execution metrics:
Bash
=== Run Results ===
Context
Platform | sdk-alpha (https://cloud.zeyos.com/sdk-alpha/)
Engine | iXML
Metrics
Load Time | 1.2 ms
Execution Time | 45.3 ms
Memory Usage | 2.5 MB
Output Size | 128 KB
Response
HTTP Status | 200
Output
Operation completed successfully
| Metric | Description | Format |
|---|---|---|
Platform | Active linked platform | String |
Load Time | Script loading duration | milliseconds/seconds |
Execution Time | Processing duration | milliseconds/seconds |
Memory Usage | Peak memory consumption | Bytes/KB/MB/GB |
Output Size | Result data size | Bytes/KB/MB/GB |
Engine | Execution engine version | String |
Output | Script execution result | String |
Debug Output | Debug information | String |
Error | Error message (if failed) | String |
Examples
Bash
# Run a service script
zeysdk run services/backup.ixml --verbose
# Output:
# Input validation completed.
# Loading sync info and package info.
# Making REST call to run file on the server.
# Run completed successfully.
# === Run Results ===
# Context
# Platform | sdk-alpha (https://cloud.zeyos.com/sdk-alpha/)
# Engine | iXML
# Metrics
# Load Time | 0.8 ms
# Execution Time | 123.4 ms
# Memory Usage | 1.2 MB
# Output
# Backup completed successfully
# Run a weblet script
zeysdk run weblets/dashboard.zymba
# Output:
# === Run Results ===
# Context
# Platform | sdk-alpha (https://cloud.zeyos.com/sdk-alpha/)
# Metrics
# Load Time | 1.1 ms
# Execution Time | 67.2 ms
# Memory Usage | 3.4 MB
# Output
# Dashboard rendered successfully
# Run inline iXML
zeysdk run --ixml '<output>Hello</output>'
# Print only script output
zeysdk run services/backup.ixml --clean
# Force simple metadata output
zeysdk run services/backup.ixml --unpretty
Error Handling
| Error | Description | Resolution |
|---|---|---|
| Invalid asset class | Wrong type specified | Use correct asset class |
| Missing sync.json | No sync file | Run zeysdk link first |
| Invalid sync.json | Missing id/url | Relink instance |
| Missing asset | File not found | Check file path |
| Invalid script type | Wrong extension | Use .ixml or .zymba |
| Invalid usage | Mixed inline + filename | Use either --ixml/--zymba or <ASSET_CLASS>/<FILENAME> |
| Authentication error | Token expired | Auto-relinks |
| Execution error | Runtime error | Check error output |
By default, stack traces from API errors are hidden to keep output readable. Use --verbose to include the stack trace.
Default output style is pretty. Set a global default under zeysdk configure -> Run Output Style, or override per command with --unpretty.