Start Websphere Liberty in Debug mode and connect via Eclipse
Asked Answered
M

1

5

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

Muscular answered 8/3, 2014 at 13:38 Comment(0)
S
11

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.

Shot answered 8/3, 2014 at 13:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.