[英]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. 我知道我可以在Visual Studio 2008中调试asp.net页面,因为Visual Studio知道asp.net页面。 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.
但是我现在正在开发基于Coldfusion的应用程序,并且很好奇我是否可以使用Visual Studio调试Coldfusion页面中的js代码。 thank you in advance.
先感谢您。
Visual Studio isn't aware of CFML Syntax, so it can't debug a CFML page. Visual Studio不了解CFML语法,因此无法调试CFML页面。 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.
我认为您无论如何都无法在Visual Studio中调试(就行调试而言,是“逐步完成”)JavaScript代码-甚至不在ASPX页面内-但我不确定。
What you should use to step-debug JavaScript is Firefox and FireBug . 用于逐步调试JavaScript的应该是Firefox和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 .
有了这些工具后,您只需要了解如何使用FireBug调试JavaScript, 就可以在FireBug网站上很好地进行解释。
You need to write a debugger inside your javascript code. 您需要在JavaScript代码中编写调试器。 And also make sure that your IE Options "disable script debugging is unchecked"
还要确保您的IE选项“未选中禁用脚本调试”
Here is the reference in how to debug javascript using IE 这是有关如何使用IE调试javascript的参考
Here are the references : 以下是参考资料:
http://www.jonathanboutelle.com/mt/archives/2006/01/howto_debug_jav.html 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://weblogs.asp.net/scottgu/archive/2007/07/19/vs-2008-javascript-debugging.aspx
http://www.asp.net/learn/videos/video-219.aspx http://www.asp.net/learn/videos/video-219.aspx
Hope this helps, 希望这可以帮助,
hadi 哈迪
I would add 1 to what Adam said. 我将亚当说的加1。 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).
要在IE中调试Javascript,可以下载Visual Web Developer2008。创建一个默认网站(文件>新网站),然后启动调试(菜单上的绿色播放按钮)。 This will launch an IE window pointing to localhost.
这将启动一个指向localhost的IE窗口。 ( http://localhost:3928/WebSite1/Default.aspx ) If you change the url to whatever, you will start debugging in IE as well.
( http:// localhost:3928 / WebSite1 / Default.aspx )如果将url更改为其他内容,则也将在IE中开始调试。 I have firebug for FF.
我有FF萤火虫。 Web developer add on is also useful.
Web开发人员附加功能也很有用。 The thing is you will need to debug in IE too since IE craps on places where FF does not.
问题是您也需要在IE中进行调试,因为IE会在FF不会出现的地方进行爬网。 hope it helps...
希望能帮助到你...
Also, in your solutions explorer window, right click on default.aspx and pick "browse with..." then set IE as default browser. 另外,在解决方案资源管理器窗口中,右键单击default.aspx并选择“浏览...”,然后将IE设置为默认浏览器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.