Multiple users on the same development server may wish to use a different port number for debugging java applications.
For that, it would be useful if the port number will not be limited to be a number, since the ${env:VAR} notion is (probably) a string. Currently, trying to use environment variable for the port number gives an error.
Environment
- Operating System: CentOS Linux 8
- JDK version: JavaSE-1.8 (java-1.8.0-openjdk-1.8.0.275.b01-1.el8_3.x86_64)
- Visual Studio Code version: 1.53.2
- Java extension version: 0.13.0
- Java Debugger extension version: 0.31.0
Steps To Reproduce
- Add a launch.json attach configuration with environment variable for port number:
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Attach to Remote Program",
"request": "attach",
"hostName": "localhost",
"port": "${env:DEBUG_PORT_NUMBER}",
}
]
}
- Switch to the debug tab (CTRL+SHIFT+D) and click the start debugging play button

Current Result
Cannot start the debugger when using environment variable for port number
Expected Result
Should be able to start the debugger when using an environment variable for port number
Additional Informations
@testforstephen
@v-wenkecheng
Multiple users on the same development server may wish to use a different port number for debugging java applications.
For that, it would be useful if the port number will not be limited to be a number, since the
${env:VAR}notion is (probably) a string. Currently, trying to use environment variable for the port number gives an error.Environment
Steps To Reproduce
Current Result
Cannot start the debugger when using environment variable for port number
Expected Result
Should be able to start the debugger when using an environment variable for port number
Additional Informations
@testforstephen
@v-wenkecheng