Applet debug from IE

Hy,

I've a problem when debugging an Applet using IE.

I'm using NetBeans 4.1EA2

The HTML page start and also the applet.

I put a breakpoint in applet class code but when I try to call a method from the HTML (clicking a button) my program doesn't stop in debug.

What can I do to debug the applet without AppletViewer?

Thanks all in advance

G

[392 byte] By [sungiasala] at [2007-10-1 3:25:55]
# 1

I've found it....

Refer to : http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/debugger.html

1)in Java Control Panel-Java-Java Applet Runtime Settings press View

Under Java Runtime Parameters write this :

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

Close

Test with NetBeans IDE:

2)In the same folder of your Applet class create an html/jsp page that call the Applet

3)RightClick-View (IEXPLORE.exe start)

4)Put a breakpoint where you want

5)In Run-Attach Debugger chose Sharedmemory

Name = 2502 (the same address parameter setted above)

6)OK

Test your Applet, for example using a button that call a method in your class...here the code in html :

<input type=button value="Test " onclick="MioApplet.test('This is a test');" >

where MioApplet is the name of the applet and test is the name of the method inside the class

Happy?Yes

Bye

sungiasala at 2007-7-8 22:07:05 > top of Java-index,Archived Forums,Debugging Tools and Techniques...