Debugging
After building the method and before deploying it to the server to test it, you can check how the execution result will be returned when parameters are sent from the BACKND SDK.
Information on how you can call BACKND Function in the BACKND can be found in the relevant developer documentation.
BACKND Function development tool
Configure the debugging environment
- For debugging, debugConfig.json must first be configured.
Check debugConfig.json in Solution Explorer.
- Configure the debugConfig.json file.
debugConfig.json
{
"clientAppId": "clientAppId issued from BACKND Console",
"signatureKey": "signatureKey issued from BACKND Console",
"packageName": "App package name. The package name of the program to be built, the package name entered in BACKND Console, and the package name entered in the debugging settings must all match. ",
"authKey": "BACKND Function authentication key issued from BACKND Console",
"testId": "The test ID to run debugging on. You must enter the ID of an account that actually exists through custom sign-up or creation in BACKND Console.",
"testPw": "Test PW. As above, you must enter the PW of an account that actually exists.",
"timeoutEnable": "false", // Whether to enable timeout when debugging(A string. "true = enabled")
// Parameters to be passed to BACKND Function
// The value inside the content is passed to BACKND Function.
"content": {
// You must enter the values in JSON format(in the form of key-value pairs).
// You can set the value to be called as Param in the BACKND SDK in JSON format.
// You can call the following values in JSON format using the Backend.Content variable inside BACKND Function.
"value": "HelloWorld!"
}
}
For information on how you can obtain a BACKND Function authentication key, please refer to the Getting Started documentation.
- Configure the build.
The build configuration must be set to Debug Mode and the debugging tool must be set to BF Debug Tool to proceed with debugging normally.
If the debugging tool fails to run, check the following.
- Check if the BACKND Function development tool is installed.
- Make sure the debugging configuration setting is set to BF Debug Tool.
- Check if the debug field in the project properties is set as shown in the figure below.
- Perform debugging.
Debugging successful
If the debugging tool runs successfully, it will be displayed as shown in the figure below.
When the debugging return value is abnormal
If the content displayed in BACKND Function Return Value: is abnormal, go to Visual Studio > Solution Explorer, right-click the project name, then rebuild
to try debugging.
Debugging failed
If an invalid value is set in debugConfig.json, an error occurs as shown below.
The reason why the method failed to execute is displayed in red in BACKND Function.
errorCase
When the required key among the values of debugConfig.json does not exist Object reference not set to an instance of an object.
When there is a value of debugConfig.json that is null or blank fail to read debugConfig.json: some flag is null or empty "Print debugConfig.json content"
When the Client App ID is invalid errorCode : BadUnauthroizedException | message : bad clientAppId, Invalid clientAppId.
When the Signature Key is invalid errorCode : BadUnauthroizedException | message : bad signatureKey, Invalid signatureKey.
When the id of a non-existent account is entered errorCode : BadUnauthorizedException | message : bad customId, Invalid customId
When an incorrect account pw is entered errorCode : BadUnauthorizedException | message : bad customPassword, Invalid customPassword