Setup eclipse workspace to debug application running on jboss, without any plugin

preview_player
Показать описание
In larger organizations, access to eclipse marketplace can be restricted, and productivity plugins that help debug web apps like jboss tools cannot be downloaded/installed. In this video, an alternative strategy to setup a debug session using built-in java capabilities (JPDA/Remote Socket Debugging) is explained.
Structured list of activities as explained in the video:
How to setup your eclipse workspace to debug your application running on jboss, without any plugin

2.1 notice the "Listening for transport dt_socket" message on jboss startup console
----this completes the configuration changes in jboss---

3. in eclipse, open Run -- Debug Configurations menu item
3.1 in the left hand pane scroll to find and select "Remote Java Application" -- click the new icon on the top bar
3.2 on the right, a new/shell remote debug configuration is now ready to be customized.
3.3 Ensure right project is selected, change if needed.
3.4 connection type should be standard (socket attach) by default, leave as is.
3.6 note you can specify a remote host (reachable over network) also, server need not be locally installed/running
3.7 if you select "allow termination of remote VM", you will be able to kill the server from inside eclipse after your debug session is complete.
----this completes the eclipse configurations---

4.0 to begin debugging, first ensure server is up with jpda enabled.
5.0 deploy your war file to the right jboss folder - this will normally be $JBOSS_HOME/standalone/deployments
6.0 ensure application is deployed - normally, there will be some messages on the jboss console that will indicate so
7.0 switch to eclipse, and start the debug session using configuration created in step #3
8.0 put a breakpoint in your code that you want to debug
9.0 use browser/postman to invoke the end point on the deployed app you want to debug
10.0 enjoy responsibly!

Optional steps to configure jboss startup without leaving your eclipse workspace:
1.0 Create an external tools configuration to start jboss from inside eclipse.
1.1 open Run -- External Tools -- External Tools Configurations...
1.2 in the left panel, select "Program", and then click the new icon on the top of the left panel
1.3 under the "Location" textfield, type/browse for the location of the jboss startup script.
1.4 under the "Working Directory" textfield, type/browse for the parent folder of the startup script
1.5 on the top, name the configuration to something suitable like jboss
1.6 to verify if the start up command is right, use "Show Command Line"
1.7 now you are setup to start jboss from inside your eclipse!
Рекомендации по теме
Комментарии
Автор

Very Very useful. thank you for posting the video.😊

srinivasakumark