开发者

How to use the Developer Tools in IE 7?

开发者 https://www.devze.com 2023-02-05 05:13 出处:网络
could any one tell me how to use the Developer Tools in IE 7?I am using the .Net programming language .Wanna to debug t开发者_StackOverflow社区he javascript and jquery.Add

could any one tell me how to use the Developer Tools in IE 7?I am using the .Net programming language .Wanna to debug t开发者_StackOverflow社区he javascript and jquery.


Add

debugger;

to the script where you want to debug. It will also prompt the Visual Studio to handle from there if it is installed

example

<script type="text/javascript">
debugger;
alert("Hello World");
</script>

For debugging script in IE8 developer tool bar
http://msdn.microsoft.com/en-us/library/dd565628(VS.85).aspx#dbugjscript
For IE7 sepecif JavaScript debugging you can also refer to this answer Debugging JavaScript in IE7


When debugging within the browser, it really doesn't matter what kind of server-side language or frameworks you are using (java, .net, php, whatever) all you are really debugging is the javascript on the pages, and javascript is javascript no matter where it came from.

IMO you are MUCH better off if you use chrome's developer mode (activate by right clicking and choosing inspect for instance) or the firefox-plugin called firebug for debugging javascript, but sometimes you get bugs which are only present on IE, in which case you need to check them out using tools for IE,

AFAIK there is no built-in tool for IE7, but here are some tools which work with IE7 to make debugging easier: http://www.ehow.com/list_7148039_developer-tools-ie7.html


If you want to debug your JS code using IE(x) native developer tools you first have to (as sreddhar said) put a "debugger" inside of it.

Then, you obv have to open the dev tools (F12), and under the tab "Script" just press "Start Debugging". It refreshes your page and whenever it finds "debugger" inside your code it stops in that particular point, then you can decide to put some breakpoints, view the call stack, watch and evaluate variables and so on...

0

精彩评论

暂无评论...
验证码 换一张
取 消