How do you debug Java Applets?

后端 未结 7 1782
感动是毒
感动是毒 2020-11-29 23:59

Currently, the only information I have is a one-line error message in the browser\'s status-bar.

Do you know how I could get a stack-trace for example ?

7条回答
  •  伪装坚强ぢ
    2020-11-30 00:13

    Stack traces from uncaught exceptions will appear to the console. This can be enabled from the Java Control Panel (Advanced > Java console > Show console) or some browsers have various options or plugins for enabling it.

    You can attach a debugger to the running PlugIn process.

    Perhaps the best way is not to debug at all. Write tests. Write code that doesn't couple to unnecessary assumptions - for instance that you are running as an applet. Unfortunately most GUI/applet example code is written very badly.

提交回复
热议问题