Turn on extra diagnostics while developing.
Section: Debugging and Introspection
Enable asyncio debug mode
python
python
import asyncio
async def main():
loop = asyncio.get_running_loop()
loop.set_debug(True)
await asyncio.sleep(0.1)
asyncio.run(main(), debug=True)Explanation
Debug mode helps surface slow callbacks, resource warnings, and some misuse patterns.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Debugging and Introspection