When developing Javascript / JQuery code in early phase it tends to be tricky to easily and quickly do some testing.
For experienced in Javascript it is enough FireBug-like plugins in modern browser but in complex projects it can be cumbersome.
Hence some online solutions exist.
http://jsfiddle.net/
http://jsbin.com/
They are quite self-explanatory in purpose.
I can't see how to use them in context of existing complex ASP.NET web forms pages in my website.
Just a quick refresher for a few tricks when using browser developer kits for JQuery testing.
1. Firebug
Open website. Open Firebug window (F12). Select Script tab.
You need to define some breakpoint in your markup inside some JQuery code.
I'm not sure sometimes you need to reload your website (Ctrl+F5) in order to make breakpoint active.
Do action on your website to make Firebug "fire" your new breakpoint.
At this moment you are ready to test your JQuery expression in Console tab of Firebug.
2. Visual Studio + Internet Explorer
From VS 2010 its possible to debug Javascript code.
There is only one catch. Make sure when you first start IE browser session to delete all your History and cookie.
This way you make sure that browser loads latest version of your JS file.
If not you will see in VS your JS file with [dynamic] suffix. This is NOT OK!
It means that VS found cached version of your JS file and is using it to debug.
No comments:
Post a Comment