Zum Hauptinhalt springen

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

ParameterDescriptionRequiredExample
ASSET_CLASSAsset type (services, resources, weblets)Yes (unless using --ixml/--zymba)services
FILENAMEScript file to executeYes (unless using --ixml/--zymba)daily-backup.ixml

Options

OptionDescriptionDefault
--verboseShow detailed execution progress and stack tracesfalse
--cleanPrint only console output (no metrics)false
--unprettyUse simple metadata formatting for this runfalse
--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
MetricDescriptionFormat
PlatformActive linked platformString
Load TimeScript loading durationmilliseconds/seconds
Execution TimeProcessing durationmilliseconds/seconds
Memory UsagePeak memory consumptionBytes/KB/MB/GB
Output SizeResult data sizeBytes/KB/MB/GB
EngineExecution engine versionString
OutputScript execution resultString
Debug OutputDebug informationString
ErrorError 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

ErrorDescriptionResolution
Invalid asset classWrong type specifiedUse correct asset class
Missing sync.jsonNo sync fileRun zeysdk link first
Invalid sync.jsonMissing id/urlRelink instance
Missing assetFile not foundCheck file path
Invalid script typeWrong extensionUse .ixml or .zymba
Invalid usageMixed inline + filenameUse either --ixml/--zymba or <ASSET_CLASS>/<FILENAME>
Authentication errorToken expiredAuto-relinks
Execution errorRuntime errorCheck 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.