Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

Unable to Debug Business Central On-Prem to a different instance from VS Code

(0) ShareShare
ReportReport
Posted on by 3,959

Hi All,

I have created a Server and WebServer Instance in BC16.
I'm able to connect VS Code to the respective instance, download symbols, and publish extensions.
But when I try to debug the same extension, the debugging starts to a different instance.
I need to know if there is a setting in VS Code to choose which WebserverInstance to debug.

Here is launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Dev",
"request": "launch",
"type": "al",
"environmentType": "OnPrem",
"server": "http://localhost",
"serverInstance": "Dev",
"authentication": "UserPassword",
"startupObjectId": 22,
"startupObjectType": "Page",
"breakOnError": true,
"launchBrowser": true,
"enableLongRunningSqlStatements": true,
"schemaUpdateMode": "ForceSync",
"port": 5049
}
]
}

Debugging URL with debugging context

localhost:8080/.../SignIn


Please note that I have cleared the Credential Cache, Reinstalled AL Extension, and even created a new project and downloaded the symbols.

  • Suggested answer
    Suresh Kulla Profile Picture
    47,789 on at
    RE: Unable to Debug Business Central On-Prem to a different instance from VS Code

    Specify the web client base URL and then set the Server on launch.json to that value. Make sure to restart the services and vs code.

  • Suggested answer
    Marco Mels Profile Picture
    on at
    RE: Unable to Debug Business Central On-Prem to a different instance from VS Code

    Hello,

    Did you fill in PublicWebBaseUrl in customsettings.config file?

    Thanks.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 1,169

#2
YUN ZHU Profile Picture

YUN ZHU 1,004 Super User 2025 Season 1

#3
Mansi Soni Profile Picture

Mansi Soni 830

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans