> For the complete documentation index, see [llms.txt](https://hwlab.learndsp.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hwlab.learndsp.org/microcontroller/ide/tips.md).

# Useful tips

Here are some useful shortcuts and debugging tips when using the IDE. You will find this section more useful later on, when you begin to be familiar with the programming environment.

## Shortcuts

Below are some shortcuts we find particularly useful. For MacOs, replace `"Ctrl"` with `"Command"`.

* `"Ctrl +"` click on function/variable for seeing its definition.
* `"Ctrl + Space"` for getting function/variable auto-completion (also `"Ctrl"` for MacOS since `"Command + Space"` opens the Spotlight application).
* `"Ctrl + B"` for building the *active* project.
* More shortcuts can be found [here](https://dzone.com/articles/effective-eclipse-shortcut-key).

## Debugging

Below are some useful debugging tips. Although these may not make a lot of sense upon first reading, just remember that these tips are here for later, when you start coding your applications!

* At one point you might end up with the error presented below.

![](/files/-Lu3gLm4HbEFxgot-164)

Don't worry you just have to stop the previously made "Debug session" as the driver cannot access twice the target board. (Same error as if the board was disconnected or not well powered). Press the "Stop" or the "Disconnect" button as shown below.

![](/files/-Lu3gLm6xlZiw-6f3Q_D)

* If you rename or copy/paste a project (useful to make a backup of a working project!) you might need to edit the debug configuration manually. Indeed, the debug config will still have the old binary file's name and thus will use it to program the board. The easiest workaround is to manually delete the binary file and make a new session that will automatically have the new binary file. First, you will need to open the "Debug Configuration" window as shown below.

![](/files/-Lu3gLm8zMJbFBy5eB0J)

And then you can proceed to deleting the old debug configuration files and creating a new session.

![](/files/-Lu3gLmABLGabQga0I7V)

Consequently, building the project after renaming it and performing these steps will result in an ELF file with the new project's name!

* You can double-click just to the left of a line number to create a breakpoint at a particular line. When running the program in "Debug" mode, the execution will stop at this line and you can resume using one of the buttons on the toolbar.

![](/files/-Lu3gLmCGQBJNOSM7vtn)

* If you right-click a variable, you can select to "Add watch expression", which will let you monitor and edit the value of a certain variable. Just note that they will be visible only when the microcontroller is stopped on a breakpoint or with the pause button.

![](/files/-Lu3gLmEcmrJwxrruQ5X)

Some shortcuts for debugging with breakpoints:

* `F5` - "Step into"
* `F6` - "Step over"
* `F7` - "Step return"
* `F8` - "Resume"
* `"Ctrl+Shift+B"` - "Toggle breakpoint"


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://hwlab.learndsp.org/microcontroller/ide/tips.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
