# Debugging

### Back-end

To start the back-end for development purposes, you can use`npm start`. This will trigger *nodemon* to watch out for changes. As soon as you save any changes to the code, the server will automatically be restarted.

Additionally, `npm start` will open a port for inspection. This can for example be used for debugging with *Visual Studio Code*. Simply follow this steps:

1. In VS Code, click `Debug` → `Add Configuration`
2. A new file `launch.json` should open, including a pre-configured array.
3. Paste the following object in the `configurations` array:

```javascript
        {
            "type": "node",
            "request": "attach",
            "name": "Debug Backend",
            "restart": true,
            "protocol": "inspector",
        }
```

Now, you can start the debugger in VS Code, add breakpoints, inspect variables and so. Happy bug hunt!

### Front-end

*To-Do*


---

# 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://rembrandt.gitbook.io/docs/contributing-1/debugging.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.
