Search code examples
open-liberty

Start and debug open liberty server from checked out source code


I checked out the source code of open liberty from https://github.com/OpenLiberty/open-liberty and was wondering how to start the server from the sources and deploy an application to the started server.

I found several classes with a main method, but none of them are looking promising so far. My goal is to debug the source code of the open liberty server with a deployed application.

How can I achieve this?


Solution

  • To debug a Liberty server you can do the following steps:

    1. run wlp/bin/server debug myServer. This will halt the server launch process until a debugger is attached on the default debugging port (7777)
    2. Attach a debugger on the debug port
    3. Your IDE should prompt you to "attach sources", and you can select your application source and/or the Liberty source code too