473,513 Members | 2,749 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1133
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2069
by: Robert | last post by:
Simple way of writing debug print statements in your JavaScript code. You need to have enabled popups in your browser. I liked the ability to write to the java console in Netscape 4.x. This,...
2
1934
by: apngss | last post by:
Is there any way to debug javascript in a web application? When I develop JSP pages, and it has the javascript code in it. The problem is the debugger in Java IDE (WSAD in my case) can only debug...
4
313
by: TARUN | last post by:
Hello all I am new to web technology, so plz excuse me for posting such a silly question . I have a code in C#.NET , ASP.NET, Javascript . I am a begginer of Javascript i don't understand...
15
1816
by: teppic.xxviii | last post by:
Ok, so this is a little script that I've been working on and off for the past year or so, and finally I think it might be ready to be put to the ultimate test: other people! ...
2
9006
by: joelkeepup | last post by:
Hi, I made a change this morning and now im getting an error that says either "a is undefined or null" or "e is undefined or null" the microsoft ajax line is below, I have no idea how to...
0
7259
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7158
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7380
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7535
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7523
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
455
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.