Add notes about debugging HA in Dev Container (#1469)

* Add notes about debugging HA in Dev Container

Since some people (like me and others) experience issues with the default Dev Container debugging, whcih doesn't work out-of-the box - new developers may think that debugging is not supported by the dev container out-of-the-box. This description is to indicate that normally debugging doesn't needs any additional actions to be taken to enable it. I also mentioned the way to debug remote instances, which may be very helpful for the developers, also in case of issues with the default debugging without enabling `debugpy`.
If I had such description I wouldn't loose almost 2 hours of googling trying to find out what is supported and what are the options, so I hope thanks to this people will avoid this.

* Fix typo in my previous description

* Small tweaks

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
dgtal1 2023-01-03 23:33:49 +01:00 committed by GitHub
parent 9c52c1f5fd
commit 7f88317945
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,6 +44,12 @@ The devcontainer comes with some useful tasks to help you with development, you
When a task is currently running (like `Preview` for the docs), it can be restarted by opening the command palette and selecting `Tasks: Restart Running Task`, then select the task you want to restart.
### Debugging with Visual Studio Code
If the Dev Container was set up correctly - it supports debugging by default, out-of-the-box. It provides the necessary debug configurations, so hitting F5 should launch Home Assistant. Any breakpoints put in the code should be triggered, and the debugger should stop.
It is also possible to debug a remote Home Assistance instance (e.g., productive instance) by following the procedure described [here](https://www.home-assistant.io/integrations/debugpy/).
## Manual Environment
_You only need these instructions if you do not want to use devcontainers._