Debugging Javascript With VS2005?
-
I've seen people alluding to the fact that VS2005 can be used to ddebug javascript in IE. Has anyone here done that? I'm working on a "classic" ASP website, and they took FireFox away from me, so I need to find another way (using "approved software") to perform this task.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
I've seen people alluding to the fact that VS2005 can be used to ddebug javascript in IE. Has anyone here done that? I'm working on a "classic" ASP website, and they took FireFox away from me, so I need to find another way (using "approved software") to perform this task.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
I've seen people alluding to the fact that VS2005 can be used to ddebug javascript in IE. Has anyone here done that? I'm working on a "classic" ASP website, and they took FireFox away from me, so I need to find another way (using "approved software") to perform this task.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001John Simmons / outlaw programmer wrote:
Has anyone here done that?
Yes I do it all the time. It does however has its share of annoyances some of which have gone in VS2005 SP1.
-
I've seen people alluding to the fact that VS2005 can be used to ddebug javascript in IE. Has anyone here done that? I'm working on a "classic" ASP website, and they took FireFox away from me, so I need to find another way (using "approved software") to perform this task.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001Attach to the iexplore.exe process. Debugger has always been good enough for my needs.
-
I've seen people alluding to the fact that VS2005 can be used to ddebug javascript in IE. Has anyone here done that? I'm working on a "classic" ASP website, and they took FireFox away from me, so I need to find another way (using "approved software") to perform this task.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001Apparently, yes[^]. I believe this area is one that is being focused on for VS2008 ("Visual Studio Orcas") as well: Javascript Debugging In Visual Web Developer "Orcas"[^]
Anna :rose: Linting the day away :cool: Anna's Place | Tears and Laughter "If mushy peas are the food of the devil, the stotty cake is the frisbee of God"
-
Apparently, yes[^]. I believe this area is one that is being focused on for VS2008 ("Visual Studio Orcas") as well: Javascript Debugging In Visual Web Developer "Orcas"[^]
Anna :rose: Linting the day away :cool: Anna's Place | Tears and Laughter "If mushy peas are the food of the devil, the stotty cake is the frisbee of God"
Unless VWD is already installed, I can't use it. If it can't be done with VS2005, I'm hosed.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
I've seen people alluding to the fact that VS2005 can be used to ddebug javascript in IE. Has anyone here done that? I'm working on a "classic" ASP website, and they took FireFox away from me, so I need to find another way (using "approved software") to perform this task.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
I've seen people alluding to the fact that VS2005 can be used to ddebug javascript in IE. Has anyone here done that? I'm working on a "classic" ASP website, and they took FireFox away from me, so I need to find another way (using "approved software") to perform this task.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001I do it all the time, but it has it shares of issues. If you embed javascript in your html/aspx file, then you have to attach the ie process and select script to debug it, and you must set all breakpoints manually - that is by clicking debug -> new breakpoint, and setting the file and line number manually. If the script is ina .js file referenced by the page, then you can set up a breakpoint the same way you do it in code - F9 or clicking on the left side of the code. When debugging, the same things that you use for code work for js - QuickWatch, pointing a variable and seeing it's value, step-forward, etc.
-
I've seen people alluding to the fact that VS2005 can be used to ddebug javascript in IE. Has anyone here done that? I'm working on a "classic" ASP website, and they took FireFox away from me, so I need to find another way (using "approved software") to perform this task.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/20011. Enable Javascript debugging in IE, via IE options (somewhere deep down) 2. Set a 'breakpoint' by inserting something illegal like 'null = c;' 3. Run page, attach when error occurs. 4. Drag yellow pointer over illegal line of code :)
**
xacc.ide-0.2.0.75 - now with C# 3.5 support and Navigation Bar!
**
-
1. Enable Javascript debugging in IE, via IE options (somewhere deep down) 2. Set a 'breakpoint' by inserting something illegal like 'null = c;' 3. Run page, attach when error occurs. 4. Drag yellow pointer over illegal line of code :)
**
xacc.ide-0.2.0.75 - now with C# 3.5 support and Navigation Bar!
**
-
If you can modify the JavaScript then just put
debugger;
It works like a break point (as long as you've set debugging to on in the advanced IE options)
Philosophy: The art of never getting beyond the concept of life.
-
I've seen people alluding to the fact that VS2005 can be used to ddebug javascript in IE. Has anyone here done that? I'm working on a "classic" ASP website, and they took FireFox away from me, so I need to find another way (using "approved software") to perform this task.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001YEah I've used VS2005 to debug Javascript, it's kinda cool. There is an article somewhere on MSDN explaining how to set it up
Kind Regards, Gary
My Website || My Blog || My Articles
-
I've seen people alluding to the fact that VS2005 can be used to ddebug javascript in IE. Has anyone here done that? I'm working on a "classic" ASP website, and they took FireFox away from me, so I need to find another way (using "approved software") to perform this task.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001Before youcan debug in IE you need to go to: Tools-->Options-->Advanced Tab and uncheck the option for Disable Javascript Debugging (internet explorer). Once you do that you can set breakpoints in the javascript file or you can insert the keyword debugger; in the javescript routine and it will break to the debugger at that point. If you need to debug in FireFox you can download the addin FireBug. It has some pretty cool features for drilling into objects but it has some pretty nasty bugs that crash FF altogether. Nevertheless it is still quite usefull at times. Hope this helps. David
-
Unless VWD is already installed, I can't use it. If it can't be done with VS2005, I'm hosed.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001VWD is just a subset of VS2005, so you should be able to do it just as well in VS2005 Standard, Pro or Team Editions.
Anna :rose: Linting the day away :cool: Anna's Place | Tears and Laughter "If mushy peas are the food of the devil, the stotty cake is the frisbee of God"