docs: Improve debug adapter documentation (#40441)
docs. docs. docs. Release Notes: - N/A
This commit is contained in:
@@ -175,7 +175,7 @@ You can configure ESLint's `workingDirectory` setting:
|
||||
|
||||
## Debugging
|
||||
|
||||
Zed supports debugging JavaScript code out of the box.
|
||||
Zed supports debugging JavaScript code out of the box with `vscode-js-debug`.
|
||||
The following can be debugged without writing additional configuration:
|
||||
|
||||
- Tasks from `package.json`
|
||||
@@ -191,7 +191,13 @@ As for all languages, configurations from `.vscode/launch.json` are also availab
|
||||
|
||||
If your use-case isn't covered by any of these, you can take full control by adding debug configurations to `.zed/debug.json`. See below for example configurations.
|
||||
|
||||
### Debug the current file
|
||||
### Configuring JavaScript debug tasks
|
||||
|
||||
JavaScript debugging is more complicated than other languages because there are two different environments: Node.js and the browser. `vscode-js-debug` exposes a `type` field, that you can use to specify the environment, either `node` or `chrome`.
|
||||
|
||||
- [vscode-js-debug configuration documentation](https://github.com/microsoft/vscode-js-debug/blob/main/OPTIONS.md)
|
||||
|
||||
### Debug the current file with Node
|
||||
|
||||
```json [debug]
|
||||
[
|
||||
@@ -206,8 +212,6 @@ If your use-case isn't covered by any of these, you can take full control by add
|
||||
]
|
||||
```
|
||||
|
||||
This implicitly runs the current file using `node`.
|
||||
|
||||
### Launch a web app in Chrome
|
||||
|
||||
```json [debug]
|
||||
|
||||
Reference in New Issue
Block a user