I just joined a project made with Angular JS which has a lot of nested promises. Some tasks seem to not happen in the right order, which causes some object to be overidden at some point. I need to check how/when the promises are called, which are returned first, etc. A flowchart of what's going on with all these promises woudl help me a lot, unfortunately it would take me quite some time to do it manually, so i was wondering whether there is a tool to automate that. I've been looking on Google but can't find anything like that. Any tip about how to trace promise calls/responses are welcomed!
Asked
Active
Viewed 1,473 times
1 Answers
1
Yes, such a tool exists - unfortunately not for Angular promises, and it's not in production yet - it looks something like:
See this Google+ post for a short video.
Unfortunately for you it's not available yet. The other tooling for Angular does not support this use case.
On the other hand - if you temporarily use Bluebird with Angular and you use the 3.0 branch of bluebird - it will automatically warn you about out-of-sync issues like creating promises and not returning them, passing incorrect values and so on in errors mode:
(Photos (and code :P) by Petka)

Community
- 1
- 1

Benjamin Gruenbaum
- 270,886
- 87
- 504
- 504