Skip to main content

How to enalbe debugging in 6uN new plug-in?

5 replies [Last post]
shemnon
Offline
Joined: 2003-06-11
Points: 0

Title says it all, how do I get the new plug-in archetecture to start up listening for debug request from (in particular) IDEA, or (in general) any debugger?

For the old Archetecture I just go to the java applet runtime settings and add '-Xdebug -Xrunjdwp:transport=dt_shmem,address=applet,server=y,suspend=n' to the Java runtime parameters, but that doesn't seem to make a difference for the new plug-in, it looks like it's not getting picked up, because a system proerty dump reveals..

sun.plugin2.jvm.args = "-Xbootclasspath/a:C:\\\\PROGRA~1\\\\Java\\\\jre6\\\\lib\\\\deploy.jar;C:\\\\PROGRA~1\\\\Java\\\\jre6\\\\lib\\\\plugin.jar"

i.e. no debug params. Anyone know the magic incantations and locations for those rituals?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kbr
Offline
Joined: 2003-06-16
Points: 0

This will be fixed under 6629341 in the Sun Bug Database, probably in build 11. The implementation of the fix is still underway.

Note that with JDK 6 the new attach-on-demand feature [i]should[/i] allow you to not specify -Xrunjdwp any more. I believe this is the command-line argument which is giving the new plug-in problems, and if you can get away with just specifying -Xdebug then a reasonably recent IDE should still be able to get its debugger to attach to the javaw.exe process.

kbr
Offline
Joined: 2003-06-16
Points: 0

The fix has been checked in and will be available in the forthcoming 6u10 build 11.

kbr
Offline
Joined: 2003-06-16
Points: 0

In theory the same approach should work for fhe new plugin. Are you sure you added the arguments to the right JRE version in the Java control panel? You might want to try using the new functionality to specify these arguments on a per-applet basis:

shemnon
Offline
Joined: 2003-06-11
Points: 0

Yes, I have added the params to all of the plugins in the java control panel, nothing happends.

The problem with the param method is that (a) it is not on the JNLP approved list of VM options, (probably because enableing debugging remotely has security hole writ large across it) and (b) it alters the way you debug applets. Now I would have to alter the server to do the debugging of explicitly client side code. Besides, it didn't work.

Any other suggestions?

kbr
Offline
Joined: 2003-06-16
Points: 0

I'll have to look into this after the holidays. If this isn't working in the build you're testing then it definitely won't work in later builds as we made some changes recently to filter out non-secure VM command line arguments from the Java Control Panel options. Clearly we need to rethink this. If you could file a bug (see the new plugin testing instructions for the right category) indicating that debugging of applets isn't working with the new plugin and a detailed list of steps to reproduce it that would be helpful.