docs: Validate JSON snippets (settings, keymap, tasks, etc) (#40043)
Closes #ISSUE Release Notes: - N/A *or* Added/Fixed/Improved ...
This commit is contained in:
+15
-15
@@ -37,7 +37,7 @@ You can open the same modal by clicking the "plus" button at the top right of th
|
||||
|
||||
For languages that don't provide preconfigured debug tasks (this includes C, C++, and some extension-supported languages), you can define debug configurations in the `.zed/debug.json` file in your project root. This file should be an array of configuration objects:
|
||||
|
||||
```json
|
||||
```json [debug]
|
||||
[
|
||||
{
|
||||
"adapter": "CodeLLDB",
|
||||
@@ -70,7 +70,7 @@ Compared to launching, attaching to an existing process might seem inferior, but
|
||||
|
||||
While configuration fields are debug adapter-dependent, most adapters support the following fields:
|
||||
|
||||
```json
|
||||
```json [debug]
|
||||
[
|
||||
{
|
||||
// The label for the debug configuration and used to identify the debug session inside the debug panel & new process modal
|
||||
@@ -95,7 +95,7 @@ All configuration fields support [task variables](./tasks.md#variables).
|
||||
|
||||
Zed also allows embedding a Zed task in a `build` field that is run before the debugger starts. This is useful for setting up the environment or running any necessary setup steps before the debugger starts.
|
||||
|
||||
```json
|
||||
```json [debug]
|
||||
[
|
||||
{
|
||||
"label": "Build Binary",
|
||||
@@ -112,7 +112,7 @@ Zed also allows embedding a Zed task in a `build` field that is run before the d
|
||||
|
||||
Build tasks can also refer to the existing tasks by unsubstituted label:
|
||||
|
||||
```json
|
||||
```json [debug]
|
||||
[
|
||||
{
|
||||
"label": "Build Binary",
|
||||
@@ -169,7 +169,7 @@ The settings for the debugger are grouped under the `debugger` key in `settings.
|
||||
2. `right` - The debug panel will be docked to the right side of the UI.
|
||||
3. `bottom` - The debug panel will be docked to the bottom of the UI.
|
||||
|
||||
```json
|
||||
```json [settings]
|
||||
"debugger": {
|
||||
"dock": "bottom"
|
||||
},
|
||||
@@ -187,7 +187,7 @@ The settings for the debugger are grouped under the `debugger` key in `settings.
|
||||
The meaning of a statement is determined by the adapter and it may be considered equivalent to a line.
|
||||
For example 'for(int i = 0; i < 10; i++)' could be considered to have 3 statements 'int i = 0', 'i < 10', and 'i++'.
|
||||
|
||||
```json
|
||||
```json [settings]
|
||||
{
|
||||
"debugger": {
|
||||
"stepping_granularity": "statement"
|
||||
@@ -197,7 +197,7 @@ The settings for the debugger are grouped under the `debugger` key in `settings.
|
||||
|
||||
2. Line - The step should allow the program to run until the current source line has executed.
|
||||
|
||||
```json
|
||||
```json [settings]
|
||||
{
|
||||
"debugger": {
|
||||
"stepping_granularity": "line"
|
||||
@@ -207,7 +207,7 @@ The settings for the debugger are grouped under the `debugger` key in `settings.
|
||||
|
||||
3. Instruction - The step should allow one instruction to execute (e.g. one x86 instruction).
|
||||
|
||||
```json
|
||||
```json [settings]
|
||||
{
|
||||
"debugger": {
|
||||
"stepping_granularity": "instruction"
|
||||
@@ -225,7 +225,7 @@ The settings for the debugger are grouped under the `debugger` key in `settings.
|
||||
|
||||
`boolean` values
|
||||
|
||||
```json
|
||||
```json [settings]
|
||||
{
|
||||
"debugger": {
|
||||
"save_breakpoints": true
|
||||
@@ -243,7 +243,7 @@ The settings for the debugger are grouped under the `debugger` key in `settings.
|
||||
|
||||
`boolean` values
|
||||
|
||||
```json
|
||||
```json [settings]
|
||||
{
|
||||
"debugger": {
|
||||
"show_button": true
|
||||
@@ -261,7 +261,7 @@ The settings for the debugger are grouped under the `debugger` key in `settings.
|
||||
|
||||
`integer` values
|
||||
|
||||
```json
|
||||
```json [settings]
|
||||
{
|
||||
"debugger": {
|
||||
"timeout": 3000
|
||||
@@ -277,7 +277,7 @@ The settings for the debugger are grouped under the `debugger` key in `settings.
|
||||
|
||||
**Options**
|
||||
|
||||
```json
|
||||
```json [settings]
|
||||
{
|
||||
"inlay_hints": {
|
||||
"show_value_hints": false
|
||||
@@ -297,7 +297,7 @@ Inline value hints can also be toggled from the Editor Controls menu in the edit
|
||||
|
||||
`boolean` values
|
||||
|
||||
```json
|
||||
```json [settings]
|
||||
{
|
||||
"debugger": {
|
||||
"log_dap_communications": true
|
||||
@@ -315,7 +315,7 @@ Inline value hints can also be toggled from the Editor Controls menu in the edit
|
||||
|
||||
`boolean` values
|
||||
|
||||
```json
|
||||
```json [settings]
|
||||
{
|
||||
"debugger": {
|
||||
"format_dap_log_messages": true
|
||||
@@ -331,7 +331,7 @@ Inline value hints can also be toggled from the Editor Controls menu in the edit
|
||||
|
||||
You can pass `binary`, `args`, or both. `binary` should be a path to a _debug adapter_ (like `lldb-dap`) not a _debugger_ (like `lldb` itself). The `args` setting overrides any arguments that Zed would otherwise pass to the adapter.
|
||||
|
||||
```json
|
||||
```json [settings]
|
||||
{
|
||||
"dap": {
|
||||
"CodeLLDB": {
|
||||
|
||||
Reference in New Issue
Block a user