易截截图软件、单文件、免安装、纯绿色、仅160KB

Javascript 使用IDE工具进行调试

1. Javascript Debug Toolkit介绍
JSDT(Javascript Debug Toolkit)是一个用于javascript调试的eclipse
插件,用于调试javascript。JSDT可以跨浏览器调试,支持在IE,Firefox,Safari,Chrome等主流浏览器中调试
javascript。JSDT支持设置断点,单步调试等调试工具的基本特性。
2. 如何安装
JSDT是基于eclipse3.2+,jdk1.5+基础开发的,因此安装JSDT前应当先安装jdk1.5+和eclipse3.2+。
JSDT下载地址:http://code.google.com/p/jsdt/downloads/list
,其中jsdt-1.0.0.zip是JSDT的安装包,下载把其中的三个jar包解压到eclipse的plugins目录下,重启eclipse即可。
jsdt-simple.swf是一段使用jsdt在chrome浏览器调试javascript的简单例子的录象。
jsdt-ext-desktop.swf是一段使用jsdt在safari浏览器调试javascript的录象。
3.如何使用
1.       在eclipse中打开调试对话框,如下图所示:
2.       新建一个Javascript Debug,如下图所示
在url中输入要调试的url--本地文件名或服务器上的文件名(只支持http类型的url)。在browser输入框中选择浏览器(ie,firefox,safari或chrome等)
点击调试后会打开浏览器,,eclipse也会转到调试视图,并打开所有用到的javascript文件。
如果没有打开javascript文件,请查看调试透视图中是否打开了Debug Scripts视图
如果没有打开该视图,请点击:window-show view-other->Debug Scripts打开Debug
Scripts视图,再选择当前调试堆栈,即可看到Debug Scripts视图,双击Debug
Scripts中的文件,即可打开script文件。
3.       设置断点
在js文件中可以设置断点
浏览器中运行到该行js时会自动中断,eclipse也会停止在该断点,等待用户操作。
4.       其他操作
因为其他操作和eclipse调试是一样的,这里不再多讲。


相关文档:

[翻译]High Performance JavaScript(022)

第七章  Ajax  异步JavaScript和XML
    Ajax is a cornerstone of high-performance JavaScript. It can be used to make a page load faster by delaying the download of large resources. It can prevent page loads altogether by allowing for data to be transferred between the client ......

[翻译]High Performance JavaScript(029)

Working Around Caching Issues  关于缓存问题
    Adequate cache control can really enhance the user experience, but it has a downside: when revving up your application, you want to make sure your users get the latest version of the static content. This is accomplished by renaming ......

[翻译]High Performance JavaScript(031)

Firebug
    Firefox is a popular browser with developers, partially due to the Firebug addon (available at http://www.getfirebug.com/), which was developed initially by Joe Hewitt and is now maintained by the Mozilla Foundation. This tool has increased the productivity of web develop ......

如何我javaScript获取窗口的高度和宽度

在javascript中得到当前窗口的高和宽
<body><SCRIPT LANGUAGE="JavaScript">
var  s = "";
s += "\r\n网页可见区域宽:"+ document.body.clientWidth;
s += "\r\n网页可见区域高:"+ document.body.clien ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号