Use machine hostname inside VSCode launch.json file

Viewed 202

I'd like to know if it's possible to have the launch.json file of VSCode using the hostname of my machine. To be more precisely, I'd like to use the hostname in the configurations.url properties, something like this:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "chrome",
            "request": "launch",
            "name": "Launch",
            "url": "https://<<hostname>>/",
            "webRoot": "${workspaceFolder}"
        }
    ]
}

As you can see, the url properties has <<hostname>>; though, I'd like that, when pressing F5, that <<hostname>> is automatically replaced with the machine hostname (e.g. DESKTOP-JUWKA3).

I've tried to look for answer on stackOverflow, as well as VSCode official site:

I thought something was possible with the information in the second link, but unfortunately I haven't been able to do that (maybe I'm not capable of doing it >_>)

0 Answers
Related