简体   繁体   中英

how can i debug javascript code within a coldfusion template(a coldfusion page) using visual studio 2008

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.

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 .

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 reference in 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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM