diff --git a/.vscode/launch.json b/.vscode/launch.json index 6976e26ebb2..3d967b25c15 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -9,7 +9,41 @@ "type": "python", "request": "launch", "module": "homeassistant", - "args": ["--debug", "-c", "config"] + "args": [ + "--debug", + "-c", + "config" + ] + }, + { + // Debug by attaching to local Home Asistant server using Remote Python Debugger. + // See https://www.home-assistant.io/integrations/debugpy/ + "name": "Home Assistant: Attach Local", + "type": "python", + "request": "attach", + "port": 5678, + "host": "localhost", + "pathMappings": [ + { + "localRoot": "${workspaceFolder}", + "remoteRoot": "." + } + ], + }, + { + // 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" + } + ], } ] -} +} \ No newline at end of file