Use the Administration Console. Select the GlassFish Server component and the JVM Settings tab.
To specify a different port (from 9009, the default) to use when attaching the JVM software to a debugger, specify address= port-number in the Debug Options field.
To add JPDA options, add any desired JPDA debugging options in Debug Options. See JPDA Options.
For details, click the Help button in the Administration Console from the JVM Settings page.