Hi, there's a source compiled event in v8 which I'm currently not handling which when I had it working had some performance impacts (on startup it would trigger a ton of back and forth traffic between devtools, bugger and v8), but it's definitely on the bug/todo list of bugger, as is the annoying websocket disconnected error. I currently don't have nearly as much time to work on bugger as I'd want to, so I'd be more than happy to review & accept PRs if you have any improvements.
Thanks, Jan On Thursday, July 11, 2013 at 2:10 PM, phidelta wrote: > Hi, > > I am also constantly living in bugger (great work Jan!). I am currently > looking into extending it to provide saving of local changes. > Also bugger does writes to disconnected web-sockets if you do a reload of the > dev-tools which is sometimes necessary when more sourcefiles get add via > require(). So I am also looking into finding a way to either have bugger > catch those send errors if client connections go away or even better forcing > dev-tools to update its source list when changes occurr. Maybe putting more > effort into bugger, would be time better spent. > > Regards, Philipp > > On Wednesday, July 10, 2013 1:32:29 AM UTC+2, Adam Crabtree wrote: > > Howdy all, > > > > I have LinkedIn's blessing to work full-time for 2 weeks on building a > > node.js addon[1] for remote Chrome Devtools debugging. Since I've never > > built an addon, this is a rather ambitious task for my first addon, and > > nearly everyone in the community would benefit from this, I thought I'd > > solicit interest in working with me on it, either directly via pull > > requests or indirectly by giving advice on building node.js addons. > > > > Details: > > > > Per Pavel Feldman of the Chrome Devtools team, it's possible, with possibly > > some limited support from Chrome to decouple some APIs if necessary. For me > > personally, the inability to use the native Chrome debugger has always been > > a little frustrating, and this is my attempt to do what I can to resolve > > it. Any non-trivial contributions will receive Contributor permissions to > > accelerate collaboration. > > > > Pavel has also graciously provided me with the following high-level > > overview of where to start: > > > > // Begin Quote > > There is not much info available. These are the rough hints for you (use > > cs.chromium.org (http://cs.chromium.org/) to navigate Blink source). Then > > we could chat over VC / hangouts / Skype. > > > > [Compile] > > InspectorController is a container for remote debugging protocol agents. We > > have one for the Page (InspectorController.cpp) and we have one for the > > workers (WorkerInspectorController.cpp that has limited functionality). > > Given that Node is more like a worker (pure JS execution environment), take > > a look at that file for the list of agents to compile in your module > > (InspectorDebuggerAgent, InspectorConsoleAgent, InspectorProfileAgent, > > etc.). So you would need to compile all of them. > > > > These agents would pull ScriptDebugServer.cpp, ScriptProfiler.cpp, Script* > > etc. These are wrappers around v8, should compile against v8.h. Some of > > them (ScriptProfiler) and most of the agents will reference Node and that's > > what we need to fix. In fact, most of them will pull Page, Document, Node > > for no good reason and that's what we need to fix upstream, in Blink. > > > > You would also need to generate InspectorBackendDispatcher and > > InspectorFrontend from devtools/protocol.json. First one will parse > > incoming JSON messages and will dispatch them on controller's agents, > > second will generate typed API for agents to send messages back. Some > > tweaking would be necessary here as well since currently we generate a > > giant dispatch and giant front-end instead of per-domain files. Having them > > per-domain would let you only take what you really need. > > > > [Wire] > > Lets assume it all compiled. Now you need to instantiate this controller > > and call dispatchMessageFromFrontend on it with every message from the > > front-end. Front-end will issue them using web socket transport, so you > > need to have a server web socket as a part of your Node module that would > > accept connection and do the right thing to the messages (call > > dispatchMessageFromFrontend). And for the way back, your m_frontendChannel > > would need to send info back using that web socket. > > > > [Debugging] > > After compiling and wiring, console will start working. But you also need > > to make things work while on breakpoint. For that, you would need to > > implement runMessageLoopOnPause in your version of WorkerScriptDebugServer. > > > > As I mentioned, it is quite some work both downstream (in the Node module) > > and upstream (to remove poor Blink dependencies from agents). But it might > > be worth it. > > > > Regards > > Pavel > > > > // End Quote > > > > > > Feel free to submit pull requests or post issue to > > https://github.com/crabdude/lookingglass > > > > Cheers, > > Adam Crabtree > > > > [1] http://nodejs.org/api/addons.html > > > > -- > > Better a little with righteousness > > than much gain with injustice. > > Proverbs 16:8 > > -- > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > (mailto:[email protected]) > To unsubscribe from this group, send email to > [email protected] > (mailto:[email protected]) > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > > --- > You received this message because you are subscribed to a topic in the Google > Groups "nodejs" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/nodejs/KlriDbLz1ho/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected] > (mailto:[email protected]). > For more options, visit https://groups.google.com/groups/opt_out. > > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
