Support environment variable for port number in launch.json debug configuration (#984)
This commit is contained in:
parent
21c9f1ab4f
commit
bed2489f62
|
@ -403,7 +403,7 @@
|
|||
"description": "%java.debugger.attach.hostName.description%"
|
||||
},
|
||||
"port": {
|
||||
"type": "number",
|
||||
"type": ["number", "string"],
|
||||
"description": "%java.debugger.attach.port.description%"
|
||||
},
|
||||
"processId": {
|
||||
|
|
|
@ -313,7 +313,8 @@ export class JavaDebugConfigurationProvider implements vscode.DebugConfiguration
|
|||
}
|
||||
}
|
||||
} else if (config.request === "attach") {
|
||||
if (config.hostName && config.port) {
|
||||
if (config.hostName && config.port && Number.isInteger(Number(config.port))) {
|
||||
config.port = Number(config.port);
|
||||
config.processId = undefined;
|
||||
// Continue if the hostName and port are configured.
|
||||
} else if (config.processId !== undefined) {
|
||||
|
|
Loading…
Reference in New Issue