How to show node call stack with client call stack?

52 views
Skip to first unread message

Jason San Jose

unread,
Sep 3, 2013, 11:20:23 PM9/3/13
to theseus...@googlegroups.com
I've setup a sample project (actually, it's Tom's name-directory and name-directory-server) running with Theseus 0.4.8 and node-theseus. I can see the calls appear for both the client and server code.

From a prior demo I remember seeing the node callbacks in the same call stack as the client code, e.g. client getJSON() -> server nodeSideHandler() -> client getJSONCallback. However, when I click on the appropriate calls, the node-side callbacks are always at the root of the call stack.

Am I doing something wrong or is there a new bug?

Jason

Tom Lieber

unread,
Sep 3, 2013, 11:49:58 PM9/3/13
to Jason San Jose, theseus...@googlegroups.com
Unfortunately, that's the expected behavior for now (and always has been AFAIK). The log has a deep-rooted assumption that it receives data in chronological/causal order, which isn't easy to ensure when gathering data from both Chrome and Node.js simultaneously, and the reason why this feature has been a long time coming.


--
You received this message because you are subscribed to the Google Groups "Theseus Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theseus-discu...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Tom Lieber
http://AllTom.com/
http://infinite-sketchpad.com/

Joel Brandt

unread,
Sep 4, 2013, 8:39:56 AM9/4/13
to Tom Lieber, Jason San Jose, theseus...@googlegroups.com
We've talked quite a bit about adding something to the headers of AJAX requests so that we can track the causality better. Unfortunately, It seems like we can't just wrap the native XMLHttpRequest object in Chrome to do this. JQuery, for example, does some crazy stuff with its XHR objects.

A potential good way to do it could be using the XHR breakpoints in the Chrome debugger, but last time we looked into this they didn't support all of the events we needed. I spent a small amount of time trying to convince Paul Irish that he should get someone to add those events, but it never went anywhere.

Anyway... as Tom said, we'd really like to do this! Patches welcome. :-)
Reply all
Reply to author
Forward
0 new messages