Enabling JPDA

To enable JPDA for Unwired Platform debugging, start Unwired Server in JPDA mode.

Set up JPDA and attache the Java standard debugger to Unwired Server:

  1. Change to the <UnwiredPlatform_InstallDir>\Servers\UnwiredServer\bin directory.
  2. By default JPDA connects over port 5005. Change the port by running djc-setenv.bat from the same folder by issuing this command:
    set DJC_JPDA_PORT=<portNumber>
  3. Start Unwired Server in JPDA mode, which varies, depending on whether or not Unwired Server is installed as a service:
    • If Unwired Server is not a service, run:
      start-unwired-server.bat -jpda 
    • If Unwired Server is installed as a Windows service:
      1. Stop the service:
        sup-server-service.bat stop
      2. Edit the <UnwiredPlatform_InstallDir>\Servers\UnwiredServer\bin\mlsrv.ini file. Add this line:
        -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 
        before this line:
        -DMLStartClasses=com.sybase.djc.mobilink.StartServer
      3. Restart the service:
        sup-server-service.bat start
  4. Once Unwired Server is restarted, verify that JPDA mode is working by running:
    netstat -ano | findstr 5005
    Look for these results:
    TCP  0.0.0.0:<JPDAport>   0.0.0.0:0  LISTENING 
  5. Use a standard Java debugger and attach it to Unwired Server by specifying the correct host and the JPDA port used.
Begin debugging the result filter class with the Java debugger.