guide-getting-started icon indicating copy to clipboard operation
guide-getting-started copied to clipboard

Getting Started guide feedback (very nice! add debugging?)

Open mattwelke opened this issue 3 years ago • 0 comments

I clicked the green button at the end to indicate I was happy with the guide, but there was no room for comment, so I figured I'd leave one here.

This tutorial was A+. I came here after reading the first few chapters of Practical Cloud-Native Java Development with MicroProfile and learning about JAX-RS, JSON-P, and JSON-B, because I wanted to get a better sense of what application servers are and what Open Liberty is before continuing in the book. I'm coming from app dev in Node.js and Go. I'm only familiar with platforms where the HTTP server comes from the standard library and embedded into the program I make.

Everything worked perfectly for me and I liked the pace, how it showed all the ways to run the app. Everything I was interested in when it came to running the code was covered... interactively with Maven, with Docker, as a self-contained JAR. Brilliant.

It didn't cover debugging with breakpoints which was crucial to me, but I happened to already be familiar with remote debugging and I noticed the log output say remote debugging was possible at a certain port. I was able to get debugging working easily in both IntelliJ IDEA and VS Code when using mvn liberty:dev and mvn liberty:devc. It didn't work with the self-contained JAR method, but that was fine for me:

image

My launch.json for future reference for anyone who comes here:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "type": "java",
            "name": "Attach to Liberty",
            "request": "attach",
            "hostName": "localhost",
            "port": 7777
        }
    ]
}

Maybe debugging would be the one thing that should be added to the guide, by using remote debugging, if my assumption that this is the preferred way to do it is correct?

mattwelke avatar Jan 26 '22 02:01 mattwelke