Proposal:
I feel like the ABI should have an awaitable_set_debug() ABI function that users can call when they compile their extension with _DEBUG/DEBUG defined:
- In debug when that ABI is called it sets an internal only global structure that configures logging to a file named
pyawaitable.log in the current active directory of the running python interpreter.
- It would then from within any and all following ABI calls logs all reference counts (in case of memory leak or decref too much), errors (if applicable), results (say ones set from
SetResult, and also log if callbacks fail so it can help pinpoint which callback might have a problem (or causes an Access Violation to make debugging easier in user code).
I feel like this sort of ABI would be great and must be set before the init ABI function is called. Any additional calls to it does nothing.
Proposal:
I feel like the ABI should have an
awaitable_set_debug()ABI function that users can call when they compile their extension with_DEBUG/DEBUGdefined:pyawaitable.login the current active directory of the running python interpreter.SetResult, and also log if callbacks fail so it can help pinpoint which callback might have a problem (or causes an Access Violation to make debugging easier in user code).I feel like this sort of ABI would be great and must be set before the init ABI function is called. Any additional calls to it does nothing.