Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Java JDWP Debugger
If you are developing Java applications running on either 32-bit or 64-bit virtual machines, you can debug them either locally or remotely using the Java Debug Wire Protocol (JDWP).
System Requirements
On the Remote machine, this software is required:
• | Java JDK (32-bit and 64-bit support) |
On the Local machine, this software is required:
• | Enterprise Architect Version 10 |
Analyzer Script Settings
Field/Button |
Action |
See also |
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Debugger |
Click on the drop-down arrow and select Java (JDWP).
|
|
||||||||||||
Run |
Click on this radio button to run the debugger when the script is executed.
|
|
||||||||||||
Default Directory
|
Not applicable - leave blank.
|
|
||||||||||||
Application path
|
||||||||||||||
Command Line Arguments
|
||||||||||||||
Build first
|
||||||||||||||
Show console
|
||||||||||||||
Show diagnostic messages
|
||||||||||||||
Connection
|
||||||||||||||
Port |
Set the application port forward-assigned to the VM process during start-up, in the Java command-line options.
|
|
||||||||||||
Host |
Set the host computer (defaults to localhost ) If VM is running on a networked computer, enter the network name or url here. By default debugging will attempt to connect to the port you specify on the local machine.
|
|
||||||||||||
Source |
This is the source equivalent of the classpath setting in Java. List the root to each source tree; specify at least one root source path. If you specify more than one, separate them with a semi-colon; for example:
c:\myapp\src;c:\myserver\src
When a breakpoint occurs the debugger searches for the Java source in each of the source trees listed here.
|
|
||||||||||||
Logging |
Enable or disable logging of additional information from the debugger. Possible values include:
|
|
||||||||||||
Output |
Specify the full name of the local log file to be written. If the folder does not already exist, no log will be created. The log file typically contains a dump of bytes sent between the debugger and VM.
|
|
||||||||||||
Platform |
Select Java.
|
|
Configure Ports for Debugging
The debugger can only debug one VM at a time; it uses a single port for communication with the VM. The port for the application to be debugged is assigned when the VM is created.
Local Debugging
Where both Enterprise Architect and the Java VM are running on the same machine, you can perform local debugging. It is necessary to launch the VM with the JDWP transport enabled - see the documentation on Java Platform Debugger Architecture (JPDA) at Oracle for the command line option specifications.
For example:
java -agentlib:jdwp=transport=dt_socket,address=localhost:9000,server=y,suspend=n -cp "c:\samples\java\myapp;%classpath%" samples.MyApp "param1" "param2"
In this example the values for the Analyzer script are host = localhost and port = 9000.
Remote Debugging
Where Enterprise Architect is running on the local machine and the Java VM is running on a remote machine, you can perform remote debugging. It is necessary to launch the VM with the JDWP transport enabled - see the documentation on JPDA at Oracle for the command line option specifications.
For example (where the remote computer has the network name test01) :
java -agentlib:jdwp=transport=dt_socket,address=9000,server=y,suspend=n -cp "c:\samples\java\myapp;%classpath%" samples.MyApp "param1" "param2"
No host name is defined in the address, so VM will listen for any connection on any adaptor. In this example the values for the Analyzer script are host = test01 and port = 9000.