Skip to content

Latest commit

 

History

History
66 lines (36 loc) · 1.92 KB

test-debugging.md

File metadata and controls

66 lines (36 loc) · 1.92 KB

Debugging of tests

Goal for this training chapter

After this training session:

  • you know enable debugging extension
  • you have learned how to set a breakpoint
  • you know how to start the debugging
  • you know where you find further information regarding the main control panel and different views of the debug extension

Enable he debug extension within AX Code

To enable the debugging, the debug extension need a configuration file. It's called launch.json.

  1. Open the debug extension in the left side bar

    debug

  2. Click on `create a launch.json file.

    debug

    This is needed for the Debug extension. If already a launch.json exists, then this step is not necessary.

  3. Select Debug ST tests

    debug

    Result:

    debug

    Note: this file must not be changed manually

Set a breakpoint

  1. Open the file ./src/Math/Add.st

  2. Set a breakpoint by clicking left beside the line numbers (see screenshot)

    debug

Start debugging

  1. Open the test explorer and click on Debug Tests

    debug

  2. Watch the result

    debug

    Explanation:

    1. the debugger stops at the breakpoint
    2. shows the main control panel for debugging. More information you'll find here.
    3. shows the call stack and variables view. More information you'll find here
  3. End debugging by pressing Shift + F5 or clicking on Stop on the main control panel

Summary

Goal reached? Check yourself...

Back to overview