From d0cb70f828b774e728aa287b29acbbc432acf95f Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 24 Apr 2024 11:50:07 +0200 Subject: [PATCH] Document debug configuration setting (#32411) * Document debug configuration setting Enable Home Assistant's built-in debug, which can help locate misbehaving integrations by enabling run-time checks for implementation errors. It can block many unsafe thread operations from crashing the system. Enabling debug has a slight performance impact on the system and is not recommended for long-term use. * Update basic.markdown * add to troubleshooting as well * cleanups * cleanups * restore lost info from merge conflict --- source/_docs/configuration/troubleshooting.markdown | 11 +++++++++++ source/_integrations/homeassistant.markdown | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/source/_docs/configuration/troubleshooting.markdown b/source/_docs/configuration/troubleshooting.markdown index 1033a4859bc..327d8a8b62e 100644 --- a/source/_docs/configuration/troubleshooting.markdown +++ b/source/_docs/configuration/troubleshooting.markdown @@ -123,3 +123,14 @@ After you download logs, you will also want to download the diagnostics for the Example of Download Diagnostics Example of Download Diagnostics.

+ +### Handling unexpected restarts or crashes + +Suppose you find that Home Assistant unexpectedly restarts or crashes; it's likely that you have a misbehaving integration impacting system stability. Home Assistant has a built-in debug option that can help find implementation errors. It can also block many unsafe thread operations from crashing the system. Enabling debug has a slight performance impact on the system and is not recommended for long-term use. To enable debug, add the following to your `configuration.yaml`: + +```yaml +homeassistant: + debug: true +``` + +Once debug is enabled, periodically check [Home Assistant System Logs](https://my.home-assistant.io/redirect/logs) for new messages. \ No newline at end of file diff --git a/source/_integrations/homeassistant.markdown b/source/_integrations/homeassistant.markdown index cbe1239a02d..714bdaa063e 100644 --- a/source/_integrations/homeassistant.markdown +++ b/source/_integrations/homeassistant.markdown @@ -55,6 +55,7 @@ To get started with the general settings in YAML, follow these steps: media_dirs: media: "/media" recordings: "/mnt/recordings" + debug: false ``` 2. Edit each entry to fit your home. @@ -134,6 +135,11 @@ country: description: "Country in which Home Assistant is running. This may, for example, influence radio settings to comply with local regulations. The country should be specified as an ISO 3166.1 alpha-2 code. Pick your country from the column **Code** of [Wikipedia's list of ISO 31661 alpha-2 officially assigned code codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)" required: false type: string +debug: + description: Enable Home Assistant's built-in debug, which can help locate misbehaving integrations by enabling run-time checks for implementation errors. It can block many unsafe thread operations from crashing the system. Enabling debug has a slight performance impact on the system and is not recommended for long-term use. + required: false + type: boolean + default: false {% endconfiguration %} ## Services