Eclipse - script debugging
To debug scripts in operation you have to start a process by running Java Virtual Machine ((JVM) (which executes a script (EVENT.EXE/HI.EXE)) by the parameter "--java-debug". It activates JVM as a remote debugging.
This parameter is an equivalent of "abbreviation" of the parameter entry "---JVM-OPTION=-agentlib:jdwp=transport=dt_socket,server=y,address=8000,suspend=n".
The debugging works in such a way that Eclipse connects to JVM on a defined port (default setting is port 8000, it may be changed by parameter "address") via TCP/IP protocol layer and executes debugging of the program.
**This holds: the one JVM working on one computer can have a connection on one port. Hence, if you want to debug more pictures/events running on different EVENT.EXE/HI.EXE, you have to set different TCP/IP ports for each of the processes via the parameters from a command line.
For example:
hi.exe --JVM-OPTION=-agentlib:jdwp=transport=dt_socket,server=y,address=8000,suspend=n
event.exe --JVM-OPTION=-agentlib:jdwp=transport=dt_socket,server=y,address=8001,suspend=n
A debug configuration needs to be created in Eclipse if the process is in debug mode.
Follow these directions:
- Open picture/event which is to be debugged (in our example it is S$TEST1).
- Choose the item Debug configurations from Run in the main menu, a dialog window opens, and then create a new debug configuration as Remote Java Application.
- Insert the port number, it must be the same as it has been set at activating of event.exe/hi.exe (or it can be 8000 if a shortened parameter "--java-debug" was used). Click on Debug button.
- Place breakpoint (1) on a required row.
- Script executing stops on the row and you can debug (by buttons - 1), browse the values of the variables, ...
Note: You need not create the new configuration for the next debugging of the same script (steps 1, 2, 3).
Related pages:
0 komentárov