# Test and debug state scripts

**URL:** <https://hub.mender.io/t/test-and-debug-state-scripts/4677>\
**Category:** General Discussions\
**Tags:** state-scripts\
**Created:** [February 22, 2022, 6:51am UTC](https://hub.mender.io/t/test-and-debug-state-scripts/4677 "2022-02-22T06:51:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dimant](https://avatars.discourse-cdn.com/v4/letter/d/e19b73/32.png) [@dimant](https://hub.mender.io/u/dimant)\
**Post date:** [February 22, 2022, 6:51am UTC](https://hub.mender.io/t/test-and-debug-state-scripts/4677/1 "2022-02-22T06:51:17Z")

</div>

Hi all, i’m using mender in standalone mode ,is possible to “manually” run the state scripts via mender client cli?? … i need to debug the scripts without restart the entire update process every time.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![eystein](https://avatars.discourse-cdn.com/v4/letter/e/e5b9ba/32.png) [@eystein](https://hub.mender.io/u/eystein)\
**Post date:** [February 22, 2022, 9:09pm UTC](https://hub.mender.io/t/test-and-debug-state-scripts/4677/2 "2022-02-22T21:09:49Z")

</div>

Hello @dimant ,

Some state scripts are run if you use Mender in standalone mode (mender -install …). Take a look here: [State scripts | Mender documentation](https://docs.mender.io/artifact-creation/state-scripts#standalone-mode)

Though you cannot run state scripts individually, all those that should be run during the update are run, when there is the right state transition.

Depending on what you are trying to debug you might simply add more standard error output from your state scripts. This will be captured in the deployment log: [State scripts | Mender documentation](https://docs.mender.io/artifact-creation/state-scripts#state-script-logging)
