JavaEE/WildFly/vscode. Debugging a web application in the vscode in conjunction with the WildFly server

As an experiment, I tried to debug a simple web application running on the WildFly server in vscode. Of course, vscode does not have the same completeness as IntelliJ IDEA in terms of features, but it can be considered as a kind of alternative. So, in order to debug your application, start the WildFly server in debug mode, specifying the port to which vscode will connect (in my case, port 8787 is specified):

standalone.sh --debug 8787
After that add the configuration:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "java",
            "name": "Debug (Attach)",
            "projectName": "your_project_name",
            "request": "attach",
            "hostName": "your_host_name",
            "port": "debugging_port"
        }
    ]
}
In my case the configuration looks like this:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "java",
            "name": "Debug (Attach)",
            "projectName": "webapp",
            "request": "attach",
            "hostName": "localhost",
            "port": 8787
        }
    ]
}
Next, start debugging by pressing F5 Now everything is ready, so you can set breakpoints and debug your application. Happy debugging 🖖