mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-07 17:36:29 +00:00
Extend Debugging documentation (#1309)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
c16a08f770
commit
d6a1fe6607
@ -7,9 +7,23 @@ The following debug tips and tricks are for developers who are running the Home
|
||||
|
||||
## Debug Supervisor
|
||||
|
||||
Below you will find an example Visual Studio Code configuration to attach a Python debugger to the Home Assistant Supervisor. This configuration is intended as the default by Run> Start Debugging or pressing F5. You will need to change "IP" to match your Supervisor's IP within the Docker environment. This can be detected from within Docker by running the command `ip addr`.
|
||||
Before you will be able to use the Python debugger you need to enable the debug
|
||||
option in Supervisor:
|
||||
|
||||
.vscode/launch.json
|
||||
```shell
|
||||
ha su options --debug=true
|
||||
ha su reload
|
||||
```
|
||||
|
||||
If you are running Supervisor on a remote host, you won't be able to access the
|
||||
Supervisor container directly. The "Remote ptvsd debugger" add-on (available
|
||||
from the [Development Add-On Repository](https://github.com/home-assistant/addons-development)
|
||||
exposes the debugging port on your host IP address allowing to debug the
|
||||
Supervisor remotely.
|
||||
|
||||
Below you will find an example Visual Studio Code configuration to attach a Python debugger to the Home Assistant Supervisor. This configuration is intended as the default by Run> Start Debugging or pressing F5. You will need to change "IP" to match your Supervisor's IP within the Docker environment (use `ip addr` within the Supervisor container) or the host IP if you debug remotely.
|
||||
|
||||
`.vscode/launch.json`
|
||||
```json
|
||||
{
|
||||
"version": "0.2.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user