You are viewing documentation for CompuTec AppEngine 3.0 (.NET 8).
If you are working with older environments, you may be looking for CompuTec AppEngine 2.0 based on .NET Framework, which is still supported: https://learn.computec.one/docs/appengine/2.0/
As CompuTec AppEngine 3.0 introduces a new architecture, all CompuTec components must be updated together.
Please familiarize yourself with the CompuTec AppEngine 3.0 documentation before installing it.
Debugging Configuration
The CompuTec.Core framework provides a robust configuration system that simplifies managing runtime settings for SAP Business One plugins and related components. At the heart of this is the Dev.config file, which allows developers to customize logging, enable debugging, configure telemetry, and tailor runtime behavior for seamless development and operations. This guide offers an overview of key configuration options and steps to debug effectively.
Logging Configuration
Logging is essential for monitoring and troubleshooting. Use the following structure to define logging levels and output destinations:
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
},
"Console": {
"IncludeScopes": true
},
"NLog": {
"IncludeScopes": true,
"RemoveLoggerFactoryFilter": false
}
}
Development Configuration
The DevelopmentConfiguration section is crucial for debugging plugins. When enabled, it loads all plugins listed in the Plugins array. Each path must lead to a valid dev.config.json file describing the plugin’s dependencies and location.
Example
"DevelopmentConfiguration": {
"Enabled": true,
"Plugins": [
"C:\git\core\SampleApp\CT.VehOne\Source\CT.VehOne.UI\dev.config.json"
]
}
Debugging SAP Business One with CompuTec Start
Requirements
- Ensure the company is activated in CompuTec AppEngine.
- Install the
CompuTec.Startadd-on. By default, it is located at:C:\Program Files\sap\SAP Business One\AddOns\CT\CompuTec.Start\X64Client\
Steps
-
Create a
dev.config.jsonfile forCompuTec.Start. This file can include logging, telemetry, properties, and force development mode configurations to load your plugin. -
Define a launch profile with the
CT_DEBUGenvironment variable pointing to thedev.config.jsonfile.
Example: launchSettings.json
{
"profiles": {
"LaunchSApUiPlugin": {
"commandName": "Executable",
"executablePath": "C:\Program Files\sap\SAP Business One\AddOns\CT\CompuTec.Start\X64Client\CompuTec.Start.exe",
"workingDirectory": "C:\Program Files\sap\SAP Business One\AddOns\CT\CompuTec.Start\X64Client\",
"environmentVariables": {
"CT_DEBUG": "C:\git\core\SampleApp\CT.VehOne\Source\CT.VehOne.UI\Properties\Debug.config.json"
}
}
}
}
Example: Debug.config.json
{
"ConnectionProperties": {
"FORMCachingDisabled": true,
"FofseDbStructureCheckOnConnectionInitialization": true,
"PluginDirectory": ""
},
"DevelopmentConfiguration": {
"Enabled": true,
"AeWwwPath": "",
"Plugins": [
"C:\git\core\SampleApp\CT.VehOne\Source\CT.VehOne.UI\dev.config.json"
]
}
}
Debugging CompuTec AppEngine
Steps to Prepare CompuTec AppEngine for Debugging
- Stop the CompuTec AppEngine service.
- Navigate to the CompuTec AppEngine directory:
C:\Program Files\CompuTec AppEngine - Edit the
DevApp.templatefile:- Specify the database connection string.
- Define a unique Dev Instance GUID.
- Assign a name to this instance.
- Optionally adjust logging settings.
- Save the file as
DevApp.config.json.
Example: DevApp.config.json
{
"ConnectionStrings": {
"DefaultDbProvider": "Hana",
"DefaultConnection": "Database=DEV;server=hanadev:30013;uid=SYSTEM;password=*8*;current Schema=CTAPPDATA"
},
"DevelopmentConfiguration": {
"Enabled": true,
"Plugins": []
},
"AppEngineInstance": "e5aaf3d2-626c-4eea-a206-48979edee0e7",
"DefaultAppEngineInstanceName": "Development Server"
}
- Run the
CompuTec.AppEngine.Host.DevApp.core.exefile as Administrator. - Activate the required companies via
https://localhost:54001. - Stop the application if you wish to run it from a development environment.
Debugging Web Plugins with CompuTec AppEngine
Prepare a launchSettings.json file for debugging web plugins.
Example: launchSettings.json
{
"profiles": {
"Default": {
"commandName": "Executable",
"executablePath": "C:\Program Files\CompuTec AppEngine\CompuTec.AppEngine.Host.DevApp.core.exe",
"workingDirectory": "C:\Program Files\CompuTec AppEngine",
"environmentVariables": {
"CT_DEBUG": "yourProjectPath\Properties\DevAeConfig.config.json"
}
}
}
}
Example: DevAeConfig.config.json
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
},
"Console": {
"IncludeScopes": true
},
"Debug": {
"IncludeScopes": true
}
},
"DevelopmentConfiguration": {
"Enabled": true,
"Plugins": [
"C:\git\core\SampleApp\CT.VehOne\Source\CT.VehOne\dev.config.json"
]
}
}
The Dev.config file in the CompuTec.Core framework is a powerful tool for customizing and debugging SAP Business One plugins. By correctly configuring logging, enabling development mode, and preparing CompuTec AppEngine for debugging, developers can streamline their workflows and ensure smooth plugin integration. With this guide, you are equipped to configure, debug, and deploy your solutions efficiently.