Fork me on GitHub

Hi, just wanted to share with you a half-baked idea which enables long stack traces for core.async in ClojureScript: You can get this[1] instead of this[2]: [1] [2]


The trick is to replace goog.async.nextTick with a promise-based implementation. ES6 promises participate in Chrome DevTools “async” feature.


it is not super useful ATM, because maxAsyncStackChainDepth is currently hard-coded in DevTools and set to only 4, which is not enough for more complex core.async code: but in Dirac I can lift that number and maybe walk the call stack in a better way, so loops won’t create long stack traces


here is an upstream proposal how to handle long async-task chains generated by core.async: