# VSCode调试

按 ctrl + shift + d , 然后点击左上角的小齿轮配置，把下面代码复制进去。

在你的ts代码里面打上断点，点击绿色的小箭头开始调试即可。

这个非常有用，比你使用 console.log 调试快很多。

```
{
    // Use IntelliSense to learn about possible Node.js debug attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
       {
           "type": "node",
           "request": "launch",
           "name": "启动调试",
           "program": "${workspaceRoot}/src/index.js",
           "outFiles": [
               "${workspaceRoot}/src/*.js"
           ],
           "sourceMaps": true
       },
        {
            "type": "node",
            "request": "attach",
            "name": "附加到进程",
            "address": "localhost",
            "port": 5858,
            "outFiles": [],
            "sourceMaps": true
        }
    ]
}
```


---

# 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://nodelover.gitbook.io/koa-todo-api/vscode-tiao-shi.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.
