views:

111

answers:

3

hi everyone, i know i can debug an asp.net page in visual studio 2008, because visual studio knows asp.net pages. but i'm developing coldfusion based application now, and i'm curious whether i can use visual studio to debug the js code in coldfusion pages. thank you in advance.

A: 

Hi,

You need to write a debugger inside your javascript code. And also make sure that your IE Options "disable script debugging is unchecked"

Here is the referencein how to debug javascript using IE

Here are the references :

http://www.jonathanboutelle.com/mt/archives/2006/01/howto_debug_jav.html

http://weblogs.asp.net/scottgu/archive/2007/07/19/vs-2008-javascript-debugging.aspx

http://www.asp.net/learn/videos/video-219.aspx

Hope this helps,

hadi

hadi teo
Where is the referrence?
Shoban
@Shoban. Hi Here are the links : http://www.jonathanboutelle.com/mt/archives/2006/01/howto_debug_jav.htmlhttp://weblogs.asp.net/scottgu/archive/2007/07/19/vs-2008-javascript-debugging.aspxhttp://www.asp.net/learn/videos/video-219.aspx
hadi teo
+1  A: 

Visual Studio isn't aware of CFML Syntax, so it can't debug a CFML page. I don't think you can debug (in the sense of line-debugging, "stepping through") JavaScript code in Visual Studio anyway -- not even inside an ASPX page -- but I'm not sure.

What you should use to step-debug JavaScript is Firefox and FireBug. Once you've got the tools, all you need to know is how to use FireBug to debug your JavaScript, which is explained pretty well right on the FireBug website.

Adam Tuttle
A: 

I would add 1 to what Adam said. To debug Javascript in IE, you can download Visual Web Developer 2008. Create a default website, (file>new web site) and then start the debug (the green play button on the menu). This will launch an IE window pointing to localhost. (http://localhost:3928/WebSite1/Default.aspx) If you change the url to whatever, you will start debugging in IE as well. I have firebug for FF. Web developer add on is also useful. The thing is you will need to debug in IE too since IE craps on places where FF does not. hope it helps...

Also, in your solutions explorer window, right click on default.aspx and pick "browse with..." then set IE as default browser.

FALCONSEYE