How do you configure JBoss to debug an application in Eclipse?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
You need to define a Remote Java Application in the Eclipse debug configurations:
Open the debug configurations (select project, then open from menu run/debug configurations) Select Remote Java Application in the left tree and press "New" button On the right panel select your web app project and enter 8787 in the port field. Here is a link to a detailed description of this process.
When you start the remote debug configuration Eclipse will attach to the JBoss process. If successful the debug view will show the JBoss threads. There is also a disconnect icon in the toolbar/menu to stop remote debugging.
What @VonC says is correct, but you can put the commands to set debug directly into
VM
arguments onjBoss
Launch.To do that, open
jBoss
server insideEclipse
, go to Open launch configuration and put this inVM
argumentstextbox
: vm argsYou mean remote debug JBoss from Eclipse ?
From Configuring Eclipse for Remote Debugging:
In the Debug frame, select the Remote Java Application node.
In the Connection Properties, specify
localhost
as the Host and specify the Port as the port that was specified in the run batch script of the JBoss server,8787
.If you set up a JBoss server using the Eclipse WebTools, you can simply start the server in debug mode (debug button in the servers view). This will allow you to set breakpoints in the application that is running inside the JBoss.
Here, if you want to directly debug the server then you can use:
1.)Windows ->
2.)Show View -> Server: Right click on server then run In debug mode.
VonC mentioned in his answer how to remote debug from Eclipse.
I would like to add that the
JAVA_OPTS
settings are already inrun.conf.bat
. You just have to uncomment them:in
JBOSS_HOME\bin\run.conf.bat
on Windows:The Linux version is similar and is located at
JBOSS_HOME/bin/run.conf