It is possible to remotely debug your Java™ code by
using Eclipse. Being able to debug processes by using a proper debugging tool is a major advantage
that Java extensions have over regular TurboIntegrator
scripts.
Procedure
- Open the
Tm1s.cfg
file for the TM1® server where Java extensions are enabled.
- Add the following parameter to the file:
JavaJVMArgs=-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044
- Save
Tm1s.cfg
.
-
Restart the TM1 server.
- In Eclipse, click Run > Debug
Configurations.
- Scroll down the tree on the left pane. Locate and double-click Remote
Java Application to create a new profile.
- Change the default Port value to
1044. This corresponds to the address value in
the JavaJVMArgs parameter you created in Step
2.
- Click Debug to start a remote debugging
session.
-
To add a breakpoint to your code, you can do one of the following:
- Double-click in the margin of the line where you want to have a breakpoint.
- Place the cursor in the line where you want a breakpoint and pressing
Ctrl+Shift+B.
- Re-run your wrapper TurboIntegrator process with Java extensions.
The
execution will break at your breakpoint and you can step through.