Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Start Websphere Liberty in Debug mode and connect via Eclipse

I am searching for a way to start the Websphere Liberty profile in debug mode from the command line? I want to be able to start Liberty, so that it is listening for debug connections on a specific port. Then I would like to connect to Liberty from Eclipse, so that I can step through and debug the server code running in Liberty.

I've tried integrating Liberty into Eclipse and using the Eclipse 'Servers' view. This works great and I can start and stop Liberty using debug mode. Unfortunately, this method does not satisfy my use case because the build process uses tools external to Eclipse.

Essentially, I need a way to do this via the command line.

I tried creating a jvm.options file for Liberty and starting it, but I still can't connect to the port I specified. I'm sure I'm doing something wrong, but thus far I haven't figured it out.

This page has some info on jvm.options

like image 932
user3395335 Avatar asked Mar 08 '14 13:03

user3395335


1 Answers

The Administering the Liberty profile from the command prompt page describes how to do this:

[bin]$ export WLP_DEBUG_ADDRESS=7778
[bin]$ ./server debug
Listening for transport dt_socket at address: 7778

You can then connect from Eclipse using Remote Debugging.

like image 123
McDowell Avatar answered Oct 12 '22 10:10

McDowell