ptr727
(Pieter)
June 21, 2023, 11:16pm
1
I’d like to conditionally enable asyncio debug mode for custom component.
In a test app I would call asyncio.run(foo(), debug=true)
.
Per docs one could:
Set PYTHONASYNCIODEBUG=1
.
Passing debug=True
to asyncio.run()
.
Calling loop.set_debug()
.
Given that asyncio is so widely used in HA, is there a configuration to enable debug mode?
I was trying to find something similar. I have a separate test HA instance and would love to configure it to always have asyncio debug set to true so it catches mistakes that my production instance might miss.
bdraco
(J. Nick Koston)
April 22, 2024, 4:49pm
3
The profiler integration has a service to turn it on as well
Is that persistent across HA restart?
bdraco
(J. Nick Koston)
April 26, 2024, 2:54pm
5
No, its not persistent after restart
set
ayncio: debug
in logger …
btw, seems the solved flag is set to a question?
1 Like
bdraco
(J. Nick Koston)
April 26, 2024, 6:46pm
7
That will only turn on debug logging for asyncio, it will not put asyncio in debug mode
1 Like
I see, I didnt notice that, but good to know, thx