vscode-ibmi
vscode-ibmi copied to clipboard
Debug v2: Pass debug ports to startDebugService.sh via environment variables
In the past, if the user need to change the debug port (to a different value other than 8005), he need to change the client setting, and also the DebugService.env file on the host.
We have implemented a new feature in debug service v2, so that the client can pass the new port numbers via environment variables before calling startDebugService.sh. Code for i can set these environment variables to the values in its Debug settings page in its "Start Debug Service" task. In the new solution, we do not need to modify the DebugService.env file on the host for the changes to take effect.
Here are the new environment variables:
MY_DBGSRV_SECURED_PORT: This one should be set to the secure debug port (default is 8005).MY_DBGSRV_SEP_DAEMON_PORT: This one should be set to the Service Entry Point Daemon Port (default is 8008). I have a separate issue to duplicate this setting in Code for i: https://github.com/codefori/vscode-ibmi/issues/1893
At this line: https://github.com/codefori/vscode-ibmi/blob/f60ddc1b81df8e3aa6211d78f53df8716f7cb44b/src/api/debug/server.ts#L31
Simply add those new environment variables at the beginning, which come from the connection settings.