How to attach to a running Java pgm for debug

Hello,

Sorry for the noise but I am new to VSCode. I have a running Java program and I need to attach to it with cusor for debugging. I do this all of the time with intellij so I know my running app is configured correctly for remote debugging.

I created a launch.json file that looks like:

{
    // 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 Remote Java",
            "request": "attach",
            "hostName": "localhost",
            "port": 9090
        }
    ]
}

But the option doesn’t show in my run menu.

I have the following extensions installed:

Debugger for Java
Java (Oracle)
Language support for Java (Oracle)

Thanks for the help!

Apparently, adding a launch configuration doesn’t update the run menu as I assumed. When you click the “Run and Debug” icon, you see the launch option there. Pretty unintuitive, if you ask me. (This is a VSCode issue and not a Cursor issue.)

For what it’s worth, my impression of VSCode is that it is a hodgepodge mess. You can do a lot with it if you want to invest the time it takes to figure out how to do it. With all of the competing, often second-rate extensions that do the same thing and the hodgepodge way extensions work, it couldn’t hardly be more confusing. I suppose it can be fun if you’ve got nothing better to do than learn it.

Personally, since Cursor forked VSCode, I’d like to see Cursor make VSCode more intuitive to use.