1
When debugging from VSCode, VSCode will open the webclient automatically, based on the setting 'Web Client Base URL' in the servicetier. you can't specify in the launch.json any additional webclient settings.
If you are using a different external port than internal port for the webclient, this won't work. For example, if you are using on the server internal https://customer.com:443/ and external https://customer.com:15443/.

There is only one setting in the ServiceTier: WebClient Base URL. You can use only the internal port here, to get the debugger working on the same server. If you want to debug from another server, you need to provide the external port number. And unfortunately, that isn’t possible. So the debugger from another server is starting a session in the browser, based on the internal port number, and you will get an error in your browser. So I think there should be an extra setting in the launch.json in VSCode, where you can put a different (external) port number that overwrites the setting on the servicetier. That way, you can leave the WebClient Base URL with the internal port.
Category: Development
STATUS DETAILS
Needs Votes
Ideas Administrator

Thank you for this suggestion! Currently this is not on our roadmap. We are tracking this idea and if it gathers more votes and comments we will consider it in the future. Best regards, Business Central Team