could any one tell me how to use the Developer Tools in IE 7?I am using the .Net programming language .Wanna to debug the javascript and jquery.
-
2That question is overly broad imo – Martin Jespersen Jan 19 '11 at 07:09
-
Does IE7 have the developer tools feature? I thought that only came in with IE8? (I don't have IE7 to check though, so I may be wrong) – Spudley Jan 19 '11 at 10:12
-
1You can install the plugin both in IE7 and IE6. It's more or less the same of IE8 (very bad IMO) – stecb Jan 19 '11 at 10:19
3 Answers
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

- 1
- 1
-
don't you also have to turn off "disable script debugging" in IE options? – AndreasKnudsen Jan 19 '11 at 07:18
-
I tried the above code.But i want to know the usage of Developer Tools in IE 8. – Hemant Kumar Jan 19 '11 at 08:25
-
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

- 3,453
- 5
- 28
- 33
-
-
1Then you should probably rename the question as it says IE7 now ;-) – AndreasKnudsen Jan 19 '11 at 10:18
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...

- 14,478
- 2
- 50
- 68