Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

Stepping Through/Debugging Base code

Posted on by 40
 
 
I want to be able to step through base code as part of diagnosing and understand underlying logic better.
 
For context I get requests for changes and I need to figure which event to subscribe to. 
 
Using AL Object designer I've search through code to find what I think is the correct event.
 
However it'd be much easier to just set a break point in code, launch and then debug and step through logic.
 
The best I could find are articles are following articles, which are from 2019: 
 
https://community.dynamics.com/forums/thread/details/?threadid=a3d17def-62f3-4a1a-935f-480bd9e9be43
https://demiliani.com/2019/10/25/dynamics-365-business-central-debugging-the-base-application/
 
Has this process changed much today (2023)? Is there a different way of doing and if not are there any more up to date guides/changes since the above articles?
 
So below is a starting point - installing a Docker sandboxed BC instance using the latest image, then extracting the source for Base App.. is 
 
$credential = Get-Credential
$artifactUrl = Get-BcArtifactUrl -type sandbox -select latest
$credential = New-Object pscredential 'admin', (ConvertTo-SecureString -String 'P@ssword1' -AsPlainText -Force)
New-BcContainer -accept_eula -artifactUrl $artifactUrl  -containerName bcserver -includeTestLibrariesOnly -includeTestToolkit -updateHosts -auth NavUserPassword -includeAl -Credential $credential

$containername = 'bcserver'
$alProjectFolder = /C://data//bc/
Create-AlProjectFolderFromBCContainer -containerName $containername -alProjectFolder $alProjectFolder -useBaseAppProperties -useBaseLine
 
TIA
Categories:
  • Suggested answer
    DAnny3211 Profile Picture
    DAnny3211 9,190 Moderator on at
    Stepping Through/Debugging Base code

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,252 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,089 Super User 2024 Season 2

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans