Ubik Batch Server Remote Debugging

From UbikWiki

(Difference between revisions)
(New page: Category:Ubik Batch Server = Remote Debugging = == What is it == Remote debugging enables simple debugging of Batches from inside Eclipse Environment. You will typically: * Start the...)
(Setup Batch Server)

Line 12:

Line 12:

* 1) Run Batch Server Installer, see []
* 1) Run Batch Server Installer, see []
-
* 2) Add DEBUGGING option:
+
* 2) Add DEBUGGING options to Batch Server command line:
** Edit <INSTALL_FOLDER>/bin/setenv.bat
** Edit <INSTALL_FOLDER>/bin/setenv.bat
** Find JAVA_OPTS
** Find JAVA_OPTS

Line 31:

Line 31:

<INSTALL_FOLDER>/config/jmx-service-url.txt
<INSTALL_FOLDER>/config/jmx-service-url.txt
-
** Enter dev/dev as login/password
+
** Enter:
 +
*** username : dev
 +
*** password : dev
== Setup Eclipse Launcher ==
== Setup Eclipse Launcher ==

Revision as of 14:58, 18 September 2012

Contents

Remote Debugging

What is it

Remote debugging enables simple debugging of Batches from inside Eclipse Environment.

You will typically:

  • Start the Batch Server with socket debug
  • Configure your Eclipse to Remote Debug one BAR project

Setup Batch Server

  • 1) Run Batch Server Installer, see []
  • 2) Add DEBUGGING options to Batch Server command line:
    • Edit <INSTALL_FOLDER>/bin/setenv.bat
    • Find JAVA_OPTS
    • Add at end :
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5006
    • In this example, we put 5006 as debug port (ensure this port is not used)
  • 3) Start Batch Server using:
    • Edit <INSTALL_FOLDER>/bin/console.bat
  • 4) Connect to Batch Server using JConsole:
    • Click on <JDK_HOME>\bin\jconsole.exe
Image:UBS_jconsole.png
    • Enter in remote field, the URL that is in :

<INSTALL_FOLDER>/config/jmx-service-url.txt

    • Enter:
      • username : dev
      • password : dev

Setup Eclipse Launcher

In Eclipse Select Debug>Debug Configurations:

Image:Eclipse_rdebug_01.png

Fill in:

  • Project (your BAR project)
  • Host : localhost
  • Port : The port you configured in Batch Server in JAVA_OPTS, 5006 in our example:
Image:Eclipse_rdebug_02.png

That's it

Now here is what you get:

  • You can put DEBUGGING points in your project code to debug your batch
Personal tools