BC AL: It is not possible to add a breakpoint at line number

rcverbeekrcverbeek LeidenMember Posts: 29
edited 2022-04-28 in NAV Three Tier
Hi,

We created a Business Central Extension that we can debug locally, i.e. in the development environment.

In the live environment we run into an issue that we want to debug, however we are unable to do so. We receive the followin error:
Error: It is not possible to add a breakpoint at line number 445 in application object type PageExtension, ID 90029

Wat we have done
  • Built the extension
  • Published and Installed the extension on the production server
  • Added a configuration in the launch.json, with request = "attach" (according to https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-debugging)
  • Set some breakpoints in our extension code
  • Start a debug session in VS and then started the app in a browser.
  • VS Code then shows some error messages: Error: It is not possible to add a breakpoint at line number 441 in application object type PageExtension, ID 90029

Does anyone has experience with debugging a remote server?

We are able to debug the Base app code, but not our extension.

The extra configuration is:
{
            "name": "Attach to Live environment",
            "type": "al",
            "request": "attach",
            "server": "http://OurServerName",
	    "port": 8049,
	    "environmentType": "OnPrem",
            "serverInstance": "BC180",
            "authentication": "Windows",
            "breakOnError": true,
	    "startupObjectId": 22,
	    "startupObjectType": "Page",
	    "launchBrowser": true,
            "breakOnRecordWrite": false,
            "enableSqlInformationDebugger": true,
            "enableLongRunningSqlStatements": true,
            "longRunningSqlStatementsThreshold": 500,
            "numberOfSqlStatements": 10,
            "breakOnNext": "WebClient"
        },

The extension targets "OnPrem", Platform "18.0.0.0" and runtime "7.2"

Thanks for your time!
Sign In or Register to comment.