Skip to content

Instantly share code, notes, and snippets.

@jigi-33
Created October 31, 2021 17:43
Show Gist options
  • Save jigi-33/39466a7049c31f12b1823484a3e2d832 to your computer and use it in GitHub Desktop.
Save jigi-33/39466a7049c31f12b1823484a3e2d832 to your computer and use it in GitHub Desktop.
asyncio code DEBUGGING tricks
import asyncio
import os
import logging, warnings
os.environ["PYTHONASYNCIODEBUG"] = "1"
logging.basicConfig(level=logging.DEBUG)
logging.getLogger("asyncio").setLevel(logging.DEBUG)
warnings.resetwarnings()
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ это в самом начале
#
#
# и в конце при запуске программы дописываем kwarg:
# "debug=True" в asyncio.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment