---
url: /en/build/login-debug.md
---
## When is Login Debugging Needed?

User-defined scripts execute inside a `Docker container`. Due to differences between local and CI environments, issues may occur in CI builds that don't appear locally.
In such cases, you can use the `Login Debugging` option on the logs page to access the pipeline's `Docker container` for debugging.

## How to Use?

Before each pipeline execution, a `Docker container` is started to run user scripts. By default, this container is destroyed after the build completes.
Therefore, you can login to the `Docker container` for debugging while the pipeline build environment exists.

Login debugging is available in two scenarios:

1. During the build process, you can login to debug.
2. Debug mode at build completion.

   On the logs page, first check the `Debug` option next to the `Rebuild` button, then click `Rebuild`. For newly triggered builds, if no one logs in for debugging, the build environment will be retained for 5 minutes after build completion, during which you can login to debug. The system will periodically check if any user has logged into the `Docker container` for debugging - if not, the environment will be automatically destroyed; if yes, it will be kept longer. The build environment is retained for a maximum of 1 hour.

## Debugging Tips

When clicking `Rebuild`, you can select which `Pipeline`, `Stage`, or `Job` to execute, helping developers reproduce the problem environment more easily.
