473,395 Members | 1,568 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

JS debugging in VS.NET - how?!

Hello,
I'm almost sure it's possible, just how?! The breakpoints I put in JS code
(client side) are not doing anything when I run ASP.Net application (F5).
How this can be done?

--
With the best wishes,
Shaul Feldman
Nov 18 '05 #1
5 1086
I wouldn't bother. Banging your head gets to be painful after a while. :-)

Mozilla makes an excellent JavaScript debugger (Venkman).
http://www.mozilla.org/projects/venkman/

--
Peter O'Reilly
Nov 18 '05 #2
Hi Shaul,

You are correct. It IS possible. However, it is not by any means the same
thing as debugging server-side code. You can't just set a breakpoint in
VS.Net. Here's what you have to do:

1. Enable client-side script debugging in Internet Explorer. This is done
using Tools|Internet Options|Advanced, and DE-selcting "Disable script
debugging". This by itself will cause IE to prompt you to debug when any
JavaScript error occurs.
2. To set a breakpoint, enter the text "debugger;" by itself on any line in
your JavaScript. When the line is hit by the browser, it will break, and
offer to open the script in VS.Net's debugger.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Shaul Feldman" <sf******@writeme.com> wrote in message
news:Oe**************@TK2MSFTNGP11.phx.gbl...
Hello,
I'm almost sure it's possible, just how?! The breakpoints I put in JS code
(client side) are not doing anything when I run ASP.Net application (F5).
How this can be done?

--
With the best wishes,
Shaul Feldman

Nov 18 '05 #3
Hello Kevin,
thanks a lot - you have just made my day (well, actually tomorrow :)
It worked great for me. I put the debugger; directive in onload even handler
and all breakpoints where working. What a fun! Now I can easily debug my
client-side scripts. BTW, the debugger, it's not in Intelisence, how come?
Thanks again!

--
With the best wishes,
Shaul Feldman
"Kevin Spencer" <ks******@takempis.com> wrote in message
news:ul*************@TK2MSFTNGP10.phx.gbl...
Hi Shaul,

You are correct. It IS possible. However, it is not by any means the same
thing as debugging server-side code. You can't just set a breakpoint in
VS.Net. Here's what you have to do:

1. Enable client-side script debugging in Internet Explorer. This is done
using Tools|Internet Options|Advanced, and DE-selcting "Disable script
debugging". This by itself will cause IE to prompt you to debug when any
JavaScript error occurs.
2. To set a breakpoint, enter the text "debugger;" by itself on any line in your JavaScript. When the line is hit by the browser, it will break, and
offer to open the script in VS.Net's debugger.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Shaul Feldman" <sf******@writeme.com> wrote in message
news:Oe**************@TK2MSFTNGP11.phx.gbl...
Hello,
I'm almost sure it's possible, just how?! The breakpoints I put in JS code (client side) are not doing anything when I run ASP.Net application (F5). How this can be done?

--
With the best wishes,
Shaul Feldman


Nov 18 '05 #4
"Shaul Feldman" <sf******@writeme.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Hello Kevin,
thanks a lot - you have just made my day (well, actually tomorrow :)
It worked great for me. I put the debugger; directive in onload even handler and all breakpoints where working. What a fun! Now I can easily debug my
client-side scripts. BTW, the debugger, it's not in Intelisence, how come?
Thanks again!

That's correct the build in MS client side debugger does not have
Intellisense built in
(at least it does not appear reliably). If you are going to do some
involved JavaScript debugging,
the venkman debugger is hard to beat as it contains debug features like call
stack, watches, object hierarchy, breakpoints and more . If you are testing
your app with a recent copy of Netscape, chances are you already have the
developer tools, including the debugger already installed. It's much more
powerful than the MS debugger .
--
Peter O'Reilly
Nov 18 '05 #5
HI,
today at work I have tried the same and got something interesting.
I have inserted the debugger; statement, but forgot to remove V from
"disable JS debugging" - it actually worked! How come?

--
With the best wishes,
Shaul Feldman

"Kevin Spencer" <ks******@takempis.com> wrote in message
news:ul*************@TK2MSFTNGP10.phx.gbl...
Hi Shaul,

You are correct. It IS possible. However, it is not by any means the same
thing as debugging server-side code. You can't just set a breakpoint in
VS.Net. Here's what you have to do:

1. Enable client-side script debugging in Internet Explorer. This is done
using Tools|Internet Options|Advanced, and DE-selcting "Disable script
debugging". This by itself will cause IE to prompt you to debug when any
JavaScript error occurs.
2. To set a breakpoint, enter the text "debugger;" by itself on any line in your JavaScript. When the line is hit by the browser, it will break, and
offer to open the script in VS.Net's debugger.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Shaul Feldman" <sf******@writeme.com> wrote in message
news:Oe**************@TK2MSFTNGP11.phx.gbl...
Hello,
I'm almost sure it's possible, just how?! The breakpoints I put in JS code (client side) are not doing anything when I run ASP.Net application (F5). How this can be done?

--
With the best wishes,
Shaul Feldman


Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs...
16
by: Serdar Kalaycý | last post by:
Hi everybody, My problem seems a bit clichè but I could not work around. Well I read lots of MSDN papers and discussions, but my problem is a bit different from them. When I tried to run the...
2
by: Andy Fish | last post by:
Hi, Using VS.NET 2003, when I use 'F5' to start debugging my web app, it obviously attaches the IDE to IIS for server debugging. However, it also seems to put IE into some kind of debugging mode...
2
by: Alex Clark | last post by:
Hi All, My system: WinXP Pro, VS.NET 2003, SQL Server Personal Edition. I'm having problems with my old favourite demon, SQL Debugging from within VS.NET. I have to say I've found this...
5
by: Velvet | last post by:
Can someone tell me to what process I need to attach to be able to step through my classic ASP code in VS.net 2003. I'm working on an XP box with IIS installed. I also have VS.net 2005 (The...
6
by: KevinGPO | last post by:
I am currently developing a website in ASP (VBScript) using MS Visual C#.NET IDE. I just create a new "ASP.NET Web Application" and point to my local webserver (IIS) of my website address. Then I...
5
by: phnimx | last post by:
Hi , We have developed a number of plug-in .NET Library Components that we typically deploy with our various applications by installing them into the GAC. Each of the applications contains an...
5
by: =?Utf-8?B?Z2FkeWE=?= | last post by:
I can't get to debug on my local IIS using VStudio.net 2005 Prof. I can on the development server. I get the msg 'the server does not support debugging for asp.net...' I have done the following...
2
jwwicks
by: jwwicks | last post by:
C/C++ Programs and Debugging in Linux This tutorial will give you a basic idea how to debug a program in Linux using GDB. As you are aware Visual Studio doesn’t run on Linux so you have to use...
4
by: =?Utf-8?B?TWlrZSBHYWxl?= | last post by:
VS 2008 initially didn't debug classic ASP. SP1 fixes this in some ways. You can debug if you select the debug option to "Start Without Debugging, then either attach the debugger manually or...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.