Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Use these methods to debug errors that have stopped Mobile Documents from being processed, including for your custom development.

Use the debugger to:

  • View the erroring code and navigate the callstack

  • Set breakpoints before the error occurs

This page only provides an overview. Please refer to the MS documentation.

Prerequisites

Info

These methods of debugging are only possible in a Sandbox. Copy your Production environment to a Sandbox as needed.

Attach and Debug-Next (Reprocess existing requests)

Use this method to re-process existing erroneous Mobile Documents and view the erroring code.

Steps

  1. Open Business Central

  2. Select ❔ in the top right-hand corner.

    1. Select "Help & Support"

    2. Select "Attach debugger to this session"

  3. Start “Regular Debugging” in Visual Studio Code

  4. Use the Mobile Document Queue to Process the document with the error. See Debugging.

Attach and Debug-Next Webservice (Catch requests before processing)

Use this method when you need to debug before a Commit happens.

Info

This method requires a mobile device to be connected to the environment you are debugging.
Make sure the Test folder points to your testing Sandbox and drag a device to the Test folder.

Steps

  1. Perform the steps from Attach and Debug-Next section

  2. Modify the launch.json file:

    1. Delete sessionId

    2. Change breakOnNext to "WebServiceClient"

  3. Start debugging

  4. Wait for the console mesage Debugger will attach to the next session of type WebServiceClient

  5. Trigger the error from the mobile device

See also

Filter by label (Content by label)
showLabelsfalse
max5
spacesTFSK
showSpacefalse
sortmodified
reversetrue
typepage
excludeCurrenttrue
cqllabel = "troubleshooting" and label = "bc" and space = "TFSK"
labelsMobiControl lockdown locked administrator