471,075 Members | 658 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,075 software developers and data experts.

How can I debug javascript ?

I have the option 'Just in time debugging' set as CLR/Native/Script. In
Project Properties/Debuggers I have ASP.NET debugging.

Still, although I have breakpoints set everywhere in my javascript, ,
inluding on "function Init()", the execution it never stops anywhere, and I
have NO idea of why my code does not appear to do anything.

Thank you.
Alex.
Nov 19 '05 #1
2 1068
"Alex Nitulescu" <RE***********************@yahoo.com> wrote in message news:ON**************@TK2MSFTNGP09.phx.gbl...
I have the option 'Just in time debugging' set as CLR/Native/Script. In Project Properties/Debuggers I have ASP.NET debugging.
Still, although I have breakpoints set everywhere in my javascript, ,
If you've recently installed XP Service Pack 2, you may have to go
into Internet Explorer | Tools | Internet Options ... | Advanced |
Disabled Script Debugging and un-check that box.

If Internet Explorer doesn't allow the debugger to attach to the
..dll hosting the script host then this will make your Running
Documents window appear empty, and XP SP2 will disable
this debugging even if you had previously had it enabled before
installing SP2.
inluding on "function Init()", the execution it never stops anywhere, and I have NO idea of why my code does not appear to do
anything.


Another thing you can do is just insert the following script block in
the <head> of your HTML (or .aspx) document,

<script language="javascript"><!--
debugger;
--></script>

Or instead of breaking into the debugger (note this won't break into
the debugger is debugging is disabled within the browser), call your
Init( ) function directly. This should ensure it at least gets called. :-)
Derek Harmon
Nov 19 '05 #2
Thanks a lot, Derek, your advice solved my problem:-))))

"Derek Harmon" <lo*******@msn.com> wrote in message
news:OI*************@TK2MSFTNGP15.phx.gbl...
"Alex Nitulescu" <RE***********************@yahoo.com> wrote in message
news:ON**************@TK2MSFTNGP09.phx.gbl...
I have the option 'Just in time debugging' set as CLR/Native/Script. In
Project Properties/Debuggers I have ASP.NET debugging.
Still, although I have breakpoints set everywhere in my javascript, ,


If you've recently installed XP Service Pack 2, you may have to go
into Internet Explorer | Tools | Internet Options ... | Advanced |
Disabled Script Debugging and un-check that box.

If Internet Explorer doesn't allow the debugger to attach to the
.dll hosting the script host then this will make your Running
Documents window appear empty, and XP SP2 will disable
this debugging even if you had previously had it enabled before
installing SP2.
inluding on "function Init()", the execution it never stops anywhere, and
I have NO idea of why my code does not appear to do anything.


Another thing you can do is just insert the following script block in
the <head> of your HTML (or .aspx) document,

<script language="javascript"><!--
debugger;
--></script>

Or instead of breaking into the debugger (note this won't break into
the debugger is debugging is disabled within the browser), call your
Init( ) function directly. This should ensure it at least gets called.
:-)
Derek Harmon

Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Robert | last post: by
2 posts views Thread by apngss | last post: by
4 posts views Thread by TARUN | last post: by
15 posts views Thread by teppic.xxviii | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.