Skip to main content

Debugging Applications

This is a collection of tips and techniques for debugging applications effectively.

Sleep​

Sometimes your application will crash on startup before you can go into the shell. In such cases, you can add a sleep command in the app spec:

name: my-app
services:
- name: app-svc
containers:
- name: app
cmd:
- sleep
- infinity

This will keep the application running indefinitely, allowing you to exec into the container and investigate the issue.

Run the Application Manually​

Once you have exec'd into the container, you can try running the application manually to see any error messages or logs that might not be captured otherwise. For example: