# Debug

For the XDK are special debugger called J-Link available from the company SEGGER. Depending on the functionality, multiple different J-Links are available.

One of them is the [**J-Link Lite debugger**](https://www.segger.com/products/debug-probes/j-link/models/j-link-lite/j-link-lite-cortex-m/) recommend for debugging purpose with the XDK. It offers the basic functionality which is needed and is in comparison with the other available J-Links quite inexpensive.

## Connecting the J-Link <a href="#connecting-the-j-link" id="connecting-the-j-link"></a>

For debugging a different connection configuration need to be done as usual. Usually the XDK is not connected directly via USB to the notebook or pc. In case of the debugging purpose, the J-link debugger takes the part of being directly connected via USB. The XDK is then connected via the 10 pin interface, which is on the long side of the XDK case, via a connection cable with the the J-Link debugger.

If both devices are connected properly, the XDK is visible in the devices view of the XDK-Workbench and the debug button is usable.

![](https://1555789063-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lj1MxDmShTQrCAMd7Sr%2F-Lj1MyjBj93yCY6nPMFc%2F-Lj1NZM2lTusVdt-uV9K%2Fimport10.png?generation=1562334349302056\&alt=media)

## Start debugging the XDK <a href="#start-debugging-the-xdk" id="start-debugging-the-xdk"></a>

First we need to set some breakpoints. A breakpoint itself is a point in the application, where the application itself will be stopped during the debug process.

Now breakpoints are set and the first application can be debugged.

For that, you only need to select the application you want to debug and click debug, instead of flash. Then a window including configuration parameter for the debug session as follows should open.

![](https://1555789063-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lj1MxDmShTQrCAMd7Sr%2F-Lj1MyjBj93yCY6nPMFc%2F-Lj1NZM4db7I5NYjYORD%2Fimport12.png?generation=1562334349292289\&alt=media)

\* For a normal debug session, the parameter can be left to their default states and only ok need to be pressed.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://alfredo-reyes-montero.gitbook.io/iot-bosch/devices/bosch-xdk-110/software/xdk-workspace/debug.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
