Hi, I’m the Toradex AI Assistant.
I might make mistakes or occasionally get you wrong. Our support team will step in if needed.
Running Debug Builds with Systemd on Torizon OS
For your use case on Torizon OS, there are several approaches to handle debug vs release builds with systemd services that persist through reboots but revert on OS updates.
Recommended Approach: Container-Based Development
Since you’re using Torizon OS, the recommended approach is to use containerized applications rather than installing directly to /usr/bin/ (1). On Torizon OS, applications are packaged in containers and run by Docker, which is already set to autorun (1).
For development workflows, you can:
- Use separate container images for debug and release builds
- Deploy debug containers that persist until you update the OS image
- Leverage the Torizon IDE Extension for seamless debug/release switching
Systemd Service Configuration
If you need to continue with the systemd approach, you can create a service configuration that checks for a debug build first (1). Here’s an example service file structure:
[Unit]
Description=My Application Service
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/bin/my-application
[Install]
WantedBy=multi-user.target
(1)
Managing Debug vs Release Builds
For your specific requirement, consider these strategies:
- Conditional ExecStart: Modify your service to check for debug builds in a persistent location (like
/var/ or /home/)
- Overlay approach: Place debug builds in a location that survives reboots but gets reset on OS updates
- Script wrapper: Create a wrapper script that determines which binary to execute
Using Systemctl Commands
You can manage your service using these systemctl commands (1):
# systemctl --system daemon-reload
# systemctl status <service_name>.service
# systemctl start <service_name>.service
# systemctl stop <service_name>.service
# systemctl enable <service_name>.service
# systemctl disable <service_name>.service
(1)
Development Workflow Recommendation
For optimal development experience on Torizon OS, consider using the Torizon IDE Extension which provides:
- Debug container images that can be easily deployed (2)
- Release container builds for production (3)
- Automated container management that handles the debug/release switching
This approach aligns better with Torizon OS’s container-first architecture and provides the persistence and update behavior you’re looking for.
Best regards, Toradex AI Assistant.
Did you like my answer?

If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.