473,320 Members | 1,600 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,320 software developers and data experts.

Debugging Javascript file

Is there any way to debug a javascript file that I included in my ASP.net
project. or some reason when I call a javascript function in the file from my
ASP.NET code I get an error message. now if i strip the entire code or the
file and put just an alert the code obviously works. So there is an error
somewhere in the javascript code. i do not know where! is there anyway to
compile the javascript file to see if there are any errors in compilation?

thanks in advance
Nov 19 '05 #1
3 1982
Check out this article:
http://www.code101.com/Code101/Displ...le.aspx?cid=67

A simple way, which might not be sufficient for all cases, is to use FireFox
and type "javascript:" in the address bar, which brings up nice details
about errors (better than IEs). Of course that's assuming ur javascript
works in firefox.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Angel" <An***@discussions.microsoft.com> wrote in message
news:11**********************************@microsof t.com...
Is there any way to debug a javascript file that I included in my ASP.net
project. or some reason when I call a javascript function in the file from my ASP.NET code I get an error message. now if i strip the entire code or the
file and put just an alert the code obviously works. So there is an error
somewhere in the javascript code. i do not know where! is there anyway to
compile the javascript file to see if there are any errors in compilation?

thanks in advance

Nov 19 '05 #2
if you use firefox, turn on the javascript console, it will list the line
number of the error.

-- bruce (sqlwork.com)

"Angel" <An***@discussions.microsoft.com> wrote in message
news:11**********************************@microsof t.com...
| Is there any way to debug a javascript file that I included in my ASP.net
| project. or some reason when I call a javascript function in the file from
my
| ASP.NET code I get an error message. now if i strip the entire code or the
| file and put just an alert the code obviously works. So there is an error
| somewhere in the javascript code. i do not know where! is there anyway to
| compile the javascript file to see if there are any errors in compilation?
|
| thanks in advance
Nov 19 '05 #3
Assuming you're using IE to debug, you need to do a couple of things. In the
Tools|Internet Options|Advanced tab, you need to enable script debugging.
This will cause IE to break when an error occurs. You can also add break
points to your JavaScript code, by adding the statement "debugger;" on a
line by itself. The script will break at any of these points.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Angel" <An***@discussions.microsoft.com> wrote in message
news:11**********************************@microsof t.com...
Is there any way to debug a javascript file that I included in my ASP.net
project. or some reason when I call a javascript function in the file from
my
ASP.NET code I get an error message. now if i strip the entire code or the
file and put just an alert the code obviously works. So there is an error
somewhere in the javascript code. i do not know where! is there anyway to
compile the javascript file to see if there are any errors in compilation?

thanks in advance

Nov 19 '05 #4

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

Similar topics

7
by: mcnewsxp | last post by:
is there a way to use another browser for ASP debugging besides IE? tia, mcnewsxp
25
by: Jeff | last post by:
Use the MS Script Editor included free with MS Office 2002 and above, for debugging Internet Explorer (IE). This subject is of great interest to many JS developers, as there is no obvious, low...
2
by: | last post by:
Hi, I'm using VS .NET 2003 edition and I had built a web project and I had been using it. But I changed a few settings(why did I ever do that...:( ) Now I'm unable to run my Web application...
4
by: gemel | last post by:
I am trying to debug the client script of a CustomValidator, but VS seems to ignore it completely. This is waht I do: Enable script debugging in Internet Explorer Launch the page from Internet...
5
by: Bill | last post by:
1. I find that debugging does not work if the JavaScript you wish to debug is included in your program via src="blah". All of my programs use this because I have many common scripts that are used...
0
by: Joseph S. | last post by:
hi all, debugging PHP applications interactively is possible, easy and free. I am talking about PHPEclipse and using it for debugging over several scripts or debugging through a session. Since I...
4
by: RichardOnRails | last post by:
Hi, First, is this an appropriate NG for talking about debugging JavaScript in Aptana? Assuming it is, I'm trying to get a script to read an external text file and display the text somehow....
6
by: Morgan Packard | last post by:
Hello, Wondering what everyone's experience with breakpoint debugging is here. I've been using firebug for a few years and, while I'm delighted to have _some_ debugging ability, I've found it to...
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.