In Google Chrome, are there better/additional ways to debug jQuery other than the element inspector?
Is there a jQuery debugger specifically for Chrome? Can't seem to find one.
EDIT: What I really mean is this: Is there a debugger made s开发者_如何学运维pecifically for debugging jQuery, not just javascript in general?
Just use Chrome's built-in debugging tools. Press CTRL + Shift + I to have the debugging tools appear. Use the "Scripts" section to debug scripts and the "Console" section to test stuff and as you mentioned, you can also inspect the elements that jQuery manipulate.
If you can't get the debugger to stop in your code, explicitly add a debug statement via the keyword debugger. Remember to remove this before deploying to prod. A good way to ensure you remove it, is to compress your scripts using YuiCompress, . Not only will it compress the script, but it will also fail to compress if there are debugger statements in the client-side code.
Why don't you use firbug?
精彩评论