-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Console hooks #65
Comments
To make sure I understand, the idea is that we test for the presence of |
That’s the idea. The intention of the design, however, is to provide enough information to an optional external interface to produce useful debugging information for a running system, without entraining all of the interface logic in Q. This feature should be developed in tandem with some kind of waterfall or tree visualization, preferably with arrows connecting causes and effects and icons or colors denoting the state of each promise. Ideally we could get such an interface on track to be included in Web Inspector or Firebug. Also, ideally this interface would be able to receive messages for remote events as well, but let’s not push it. |
Would it be possible to listen for just rejections which happen with nobody to observe them? i.e. can you tell when a promise has been observed properly. If so then this would seem like a great plan, as you could very quickly write a basic system to ensure errors never go un-observed, and could build more complex (and awesome) debuggers later. |
@Tuskan360 the latest release already does this as a stopgap. It posts "Should be empty: []" to the console log. This is a live array of all the rejections that have no handlers attached. When you create a rejection, the corresponding error gets added. When it is handled, it is removed from the array. |
Q should send messages to the console when promises are manipulated so that a monitor like a Causeway logger or Web Inspector view can be attached.
The corresponding console API is not defined. This is an idea to start the thinking process:
The text was updated successfully, but these errors were encountered: