The Issues of Post-Mortem Debugging with Promises
joyent.com
joyent.com
Besides the probably never fully granted wish of being able to replay considering the standardization of these patterns is there anything we can do:
- making the promise easier debug-able by changing the promise itself?
- making the environment more supportive of debugging (approach like zone?)?
- creating promise et. al. awareness in debuggers?
What are the existing best practices and how can we improve on them?
Edit: I didn't explain why this change is important: if the Promise is catching the exception, the Execution Context where exception was thrown is lost and (potentially) irrecoverable, the program has to crash there and now if you want to debug the reason for the exception. This is a property of the Promise standard, changes to debugging tools or environment won't help. You could make Node aware of promises, and capture the execution context with promise exception, but I don't think Promises are special enough.