http://panther.sharedknowledgesystems.com:81/sharedknowledge/sksblog.nsf
12/14/2004 11:53:41 AM - Debugging Javascript in Domino applications the sane way.

Permalink Debugging Javascript in Domino applications the sane way.





A couple of weeks ago I blogged about the css editor in Visual Studio, now I want to tell you about debugging your JavaScript routines using the Visual Studio debugging environment.


After years of using JavaScript alerts to debug my Domino applications, I'm happy to report that those days may be over. Currently I am working on an application that is being designed for a company that uses IE as their standard browser. As I test the application I occasionally hit an error (its so hard not being perfect :-) )that causes the debugging event in IE to prompt me with an error message and the opportunity to debug my code. When I select Yes to debug, I'm presented with a list of options for displaying my code and the error.


Now that I have Visual Studio installed it is listed as a debugging option along with the Microsoft Script Debugger which I also have installed. The Microsoft Script Debugger only tells me which line of code the browser is having a problem digesting. Visual Studio tells me so much more.



Yesterday I was looking at a problem with a JS routine that I was adapting from another application. Its a simple function that receives the name of a span and determines whether to expand or collapse it. Not only was the Visual Studio debugger showing me the line of code that raised the error, but when I click the Locals tab I could see the value of the relevant HTML/DHTML objects and the javascript variables that are in play. I was able to check to see if the parameter passed to the function was the correct value and I could look at the values associated with the Document Object Model.


In another example, I was getting an error telling me that a style reference that was created dynamically was either not an object or null. By looking at the variable used to create the style reference I was able to see that I had a caching problem and that the value being passed was incorrect and did not reflect what I was seeing in Domino Designer.



Comments

No documents found

Add Your Comments



Email addresses provided are not made available on this site.





You can use UUB Code in your posts.

[b]bold[/b]  [i]italic[/i]  [u]underline[/u]  [s]strikethrough[/s]

URL's will be automatically converted to Links


:-) :-D ;-) :-( :angry: :-o :grin: :cool: :laugh: :huh: :cry: :rolleyes: :-x :-p :-\ :emb: :lips:






Remember me    

Add Manual Trackback
Please enter the details of the trackback post. Your trackback will not appear on the site until it has been verified. This may take up to 10 minutes.

Site Name

Permanent URL of TrackBack Post

Title of Post ( If Any )

Excerpt of Post ( Max 250 Chars )



Calendar
February 2012
Su
Mo
Tu
We
Th
Fr
Sa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29