4 ms·
The thing I really miss when debugging js (compared to other debuggers) is the ability to skip files when stepping. Seeing the innards of jquery/backbone/unders
by bazzargh 13y ago
The thing I really miss when debugging js (compared to other debuggers) is the ability to skip files when stepping. Seeing the innards of jquery/backbone/underscore is usually no use to me, I only want to look at our site's code.
I know I can get that effect by liberally sprinkling my code with 'debugger;', and could even automate that, but still...
- numbnuts 13y agoBoth Firefox and Chrome allow you to "blackbox" js files of your choice. https://developer.mozilla.org/en-US/docs/Tools/Debugger#Black_box_a_source https://developer.mozilla.org/en-US/docs/Tools/Debugger#Blac... http://www.divshot.com/blog/tips-and-tricks/ignoring-library-code-while-debugging-in-chrome/ http://www.divshot.com/blog/tips-and-tricks/ignoring-library...
- oelmekki 13y agoThat's awesome, thanks. By any chance, do you also know of a way to exclude jQuery event wrappers from inspection in the "events" part ? Like in this screenshot : http://imgur.com/UaHTrth http://imgur.com/UaHTrth This feature is pretty useless due to the fact that libraries wrap event callbacks.
- bazzargh 13y agoThanks! In my defence, the FF feature only made it into release 19 days ago and the chrome one is still 'experimental'. But great to know this is now available.
- mattmanser 13y agoChrome's one is a dirty hack, though I admit it works. But ugh, seriously, regexes?
- paulirish 13y agoRegex is nice, so you can do something like ignore everything in bower_components\/.* or .*?\.min\.js. I'm not convinced you want to select each file you want to skip manually and one by one. That said, maybe there's a hybrid approach available. Our implementation in Chrome is definitely not final (and it's a little ugly ;) and we're collecting feedback before we iterate further.
- masklinn 13y agoThe thing I miss is the ability to define custom "breakpoint actions" for tracing without source edition. You can kind-of hack it in by using conditional breakpoints which always evaluate to false, but IIRC it there are situations where it doesn't work right. Xcode (I'm sure others as well, but I played with that one recently so...) has absolutely humongous breakpoint "options" including silencing repeats (e.g. hit a breakpoint 5 times in a session then skip it) and advanced actions[0], including multiple actions per breakpoint, which is really nice. [0] in Xcode 5, possible actions aside from a conditional break are executing applescript code, capturing an OpenGL ES frame, executing an LLDB command, logging a message (to the console or to text-to-speech), executing a shell command or playing a sound
- paulirish 13y agoAn Adobe engineer is working on a patch for Chrome DevTools for this. I agree it's useful. It actually does use the same conditional breakpoint backend, so any stories you have about the not-working-right are very appreciated.
- masklinn 13y agoI stupidly didn't take notes (as usual) so I fear I don't have anything to provide right now, but if it's being hashed out in an issue or pull request of some sort I could post it there if I hit it again.