I’m working on debugging some HomeKit thread stuff - so the remote debugger is a perfect solution for allowing me to see what’s going on within a live HAOS instance with a Thread radio attached to a live mesh with HK accessories. So I followed the instructions here: Set up Development Environment | Home Assistant Developer Docs and here: Remote Python Debugger - Home Assistant
I’ve forked core and have the correct version running in my VS Code workspace.
I’ve added:
debugpy:
start: true
wait: false
to my configuration.yaml
I launch “Home Assistant Attach Remote” from the VSCode debug tab - which uses this launch.json
entity:
{
// Debug by attaching to remote Home Asistant server using Remote Python Debugger.
// See https://www.home-assistant.io/integrations/debugpy/
"name": "Home Assistant: Attach Remote",
"type": "python",
"request": "attach",
"port": 5678,
"host": "homeassistant.local",
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "/usr/src/homeassistant"
}
]
}
This is the default section for remote attach in the workspace - and it appears to be correct for my purposes.
The versions match:
I am able to set breakpoints in the relevant __init__.py
module for the integration. (Without the correct localRoot
or remoteRoot
the breakpoints become greyed out.)
The debugger attaches to the HA instance and shows a number of running threads.
But the breakpoints never get hit - neither when restarting nor when reloading an integration entry.
logpoints don’t seem to do anything either.
Also, I am not seeing any messages at all in the debugger output.
This seems like I’m missing something simple.
Does anyone have any experience with this?