您的位置:首页 > 移动开发

在Eclipse中Applet的调试方法

2011-12-12 15:52 253 查看
一直以来没有写过Applet。最近在修改代码的时候设计到Applet,怎么调试呢?

网上查找了一下以下方法是可行的。转了过来。

1) First enable remote debugging in the Java Plugin:

a) Start –> Settings –> Control Panel –> Java –> Java Applet Runtime Settings –> View

b) Add the following to the “Java Runtime Parameters”:

-Djava.compiler=NONE -Xnoagent -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n



2) Close all Web browser Windows

3) Put breakpoints in your source code (you need to have an Eclipse project containing the applet source code)

4) In Eclipse create a remote debugging configuration:

a) Run –> Open Debug Dialog –> Remote Java Application –> New

b) Assign host = localhost and port = 8000



Allow temination of remote VM 选择上。

然后点击Debug按钮就可以debug了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: