Protip with this feature: It can resolve where you originally bound your event listeners, regardless of if you used jQuery or whatever. So, either set up a breakpoint or establish an Event Listener Breakpoint[1] and you can walk back to where you registered the handler.
All: one reason we ask you to email us at hn@ycombinator.com instead of posting about [dead] comments here is that it guarantees that we'll see the question. I only saw this by accident 10 hours later. There are too many threads for us to read them all.
This looks great. Debugging simple 'click' events has always been a non-trivial task for me -- doubly so on touch devices where an a 'click' event can have a range of unpredictable side effects.
It would have been interesting to be able to setup your own stack links (e.g. by collecting Error().stack, and being able to update this at any other point - Error.setStack?). A heap of 3rd party promise/observer/animation/etc libraries could use such a feature to ease debugging. The current implementation does not allow for this [1].
I think it's odd, to be honest, given the existence of the html5 video tag. Of course, last time I checked, there wasn't a standardized video codec yet, which would make it tl;dr for authors.
gifs have the advantage of working on lower-resource devices (cellphones, netbooks) without any delay.
youtube and other "feature-rich" sites work only with massive stuttering for me, so I'm happy for any gif instead of a video which needs to be set up and torn down for every play.
Wow, this is seriously cool! No doubt it will mean more switching back and for between Firebug and Chrome DevTools. Or am I the last one still using Firebug?
Protip with this feature: It can resolve where you originally bound your event listeners, regardless of if you used jQuery or whatever. So, either set up a breakpoint or establish an Event Listener Breakpoint (http://goo.gl/YYlbDK) and you can walk back to where you registered the handler.
(Yeah, no idea why an editor killed this comment. :/ Thanks folz!)
This is super cool. With respect to debugging at least, this gives you a similar trace to what you'd get with the Zone.js library[1] it seems. Having this kind of thing baked into the JS engine is great.
I'd like a real console object in worker (at least a variadic pretty-printing log() function and time()/timeEnd()) and a "break all threads" button too, please. Worker debugging is a pain.
I know it took a while, but take another look: Chrome now has full console support inside of workers: http://crbug.com/63383
Right now, we're doing a bunch of work (hah) on our worker support. We'll address pausing execution in workers as well. Expect good improvements and file a ticket at crbug.com for any other ideas, please!
I don't get it, 10h ago I still didn't have the fancy console.log() in workers (34.0.1847.116). Maybe there is a difference between the per worker debugger and the page global debugger, but my worker are transients (I do heavy computation without stopping the UI thread), so using the per worker debugger is not really practical.
Wasn't this possible already? Put a breakpoint or 'breakpoint;' on the function body's first line and it will pause execution when the function is called synchronously or asynchronously. And browse the call stack on the right column. What's new here? I have been doing this for quite sometime.
Asynchronous hops have never been traceable in JavaScript callstacks before. This feature allows you to hop across the asynchronous gap of a bunch of APIs: addEventListener, setInterval, setTimeout, XMLHttpRequest, promises, requestAnimationFrame, and MutationObservers.
The difference (I believe) is in the stack trace depth, specifically that the trace doesn't die if it happens to go through an async event. You can see in the first gif that if the async box is checked it allows a developer to see the stack trace all the way back to when the form submit event was initiated, despite the fact that an async ajax call was made in the middle of the stack. Normally, the stack trace stops at a response to an async event. You can see this in the beginning of the gif without the async box checked.
A means to group entries in a call stack together would be neat too; in most cases, something you're tracing won't be an issue in jquery or your library, so collapsing those would be neat.
Is HN really so focused on front end that this particular topic finds itself rapidly at the top of news feed and staying there for an extended amount of time?
Has there been a recent poll about topics active HN viewers deem as important? If it really is this JS heavy, that is intriguing.
I think the core idea here is beyond the javascript it's implemented in. I've never seen a debugger that can do this kind of async debugging before anywhere.
Don't you think it's more novel than being some trick only relevant to front end web development work?
At the ScalaX conference last year, someone demoed the Scala plugin for Eclipse debugging actor messages asynchronously, so you can breakpoint on receiving a message, then see the callstack that generated that message on a different actor, and in fact follow back through all the messages leading up to that. Very cool, though I haven't tried it in production yet (I'm currently using IntelliJ for Scala)
So, submit articles for those technologies? I'd wager that most of the people who use those technologies no longer find HN to be a useful source of news; I've noticed that a lot of coworkers are disdainful of HN now.
Protip with this feature: It can resolve where you originally bound your event listeners, regardless of if you used jQuery or whatever. So, either set up a breakpoint or establish an Event Listener Breakpoint[1] and you can walk back to where you registered the handler.
[1]: https://developers.google.com/chrome-developer-tools/docs/ja...