Debugging Business Central

BigFan
Member Posts: 2
Hi experts,
We have a question regarding debugging. As I can not find a proper answer to my question I am asking it here, hoping to get an answer.
We are working with Business Central version 17.4 onprem.
We are wondering what the best way of debugging is when we want to debug our customers production database?
We know we can attach a debug (or snapshot) configuration to the Launch.json but this will only trigger the debugger when an error occurs (or with the snapshots it will only record the snapshot when an error occurs).
On the Customers server we do have Visual Studio Code installed.
We deploy our solution (app) via powershell scripts and we have the property ShowMyCode set to False as we do not want other parties being able to download our source code.
So on the Customers server we don’t have the possibility to set breakpoints in code to trigger the debugger when executing the process we would like to debug.
So we were wondering what the best way is to debug a process in the Customers database that does not throw an error.
Thanks for the advice.
We have a question regarding debugging. As I can not find a proper answer to my question I am asking it here, hoping to get an answer.
We are working with Business Central version 17.4 onprem.
We are wondering what the best way of debugging is when we want to debug our customers production database?
We know we can attach a debug (or snapshot) configuration to the Launch.json but this will only trigger the debugger when an error occurs (or with the snapshots it will only record the snapshot when an error occurs).
On the Customers server we do have Visual Studio Code installed.
We deploy our solution (app) via powershell scripts and we have the property ShowMyCode set to False as we do not want other parties being able to download our source code.
So on the Customers server we don’t have the possibility to set breakpoints in code to trigger the debugger when executing the process we would like to debug.
So we were wondering what the best way is to debug a process in the Customers database that does not throw an error.
Thanks for the advice.
0
Answers
-
I don't know what 'throw an error' means literally. In VS Code you have the option to debug without publish. Is this what you were looking for?
0 -
Hi, I meant that we are not able to set breakpoints so we need to have an error to debug.
We know about the functionality to debug like you mentioned. However as we do not have our code at the Customers server available we are not able to set breakpoints.0 -
Good question in fact! I guess you need to change the extension with one that has ShowMyCode true I you need to debug. With PS this should be quite easy IMO. And please take note of this info from MS Docs:
"Even though showMyCode is set to false, you will still be able to view that code if an extension is deployed through Visual Studio Code, as opposed to deploying using a cmdlet or via AppSource."
All relevant info can be found on https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-security-settings-and-ip-protection0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions