Skip to content

Commit a950f51

Browse files
committed
readded documentation
1 parent a941829 commit a950f51

File tree

15 files changed

+277
-0
lines changed

15 files changed

+277
-0
lines changed

docs/Debugger/README.MD

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Client-Modes
2+
* [get-callstack](get-callstack.md)
3+
* [get-status](get-status.md)
4+
* [get-variables](get-variables.md)
5+
* [control](control.md)
6+
* [set-breakpoint](set-breakpoint.md)
7+
* [parse-sqf](parse-sqf.md)
8+
* [load-sqf](load-sqf.md)
9+
10+
# Server-Modes
11+
* [callstack](get-callstack.md)
12+
* [message](message.md)
13+
* [error](error.md)
14+
* [status](get-status.md)
15+
* [variables](get-variables.md)
16+
* [position](position.md)

docs/Debugger/control.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
## Request Schema
2+
{
3+
"mode": "control",
4+
"data": { "status": "string" }
5+
}
6+
- **mode** - `control` - always required, tells the debugger that this is a control request.
7+
- **data** - `OBJECT` - always required, object containing the field `status` that needs to be one of the following enum values: `[stop, pause, resume, quit]`.
8+
9+
10+
No response will be send.

docs/Debugger/error.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Response Schema
2+
{
3+
"mode": "error",
4+
"data": "string"
5+
}
6+
* **mode** - `error` - always set, tells the receiving end that this is a error-string in the `data` field
7+
* **data** - `STRING` - always set, contains the actual error comming from the server.
8+
9+
This response will be send whenever some error is generated on the server.

docs/Debugger/get-callstack.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/* REQUEST */
2+
{
3+
"mode": "get-callstack",
4+
"data": null
5+
}
6+
/* RESPONSE */
7+
{
8+
"mode": "callstack",
9+
"data": [
10+
{
11+
"lvl": 0,
12+
"scopename": "string",
13+
"namespace": "string",
14+
"variables": [
15+
{ "name": "string", "value", "string" }
16+
]
17+
}
18+
]
19+
}

docs/Debugger/get-callstack.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
## Request Schema
2+
{
3+
"mode": "get-callstack",
4+
"data": null
5+
}
6+
- **mode** - `get-callstack` - always required, tells the debugger that this is a get-callstack request.
7+
- **data** - `null` - always required, null as the get-callstack request does not has any further data requirements.
8+
9+
## Response Schema
10+
{
11+
"mode": "callstack",
12+
"data": [
13+
{
14+
"lvl": 0,
15+
"scopename": "string",
16+
"namespace": "string",
17+
"options": { "line": 0, "column": 0, "file": 0, "available": false }
18+
"variables": [
19+
{ "name": "string", "value", "string" }
20+
]
21+
}
22+
]
23+
}
24+
* **mode** - `callstack` - always set, tells the receiving end that this is a callstack-object in the `data` field
25+
* **data** - `ARRAY` - always set, contains the actual callstack `scope` objects as they are present on the sqf-end.
26+
27+
#### The Scope Object
28+
{
29+
"lvl": 0,
30+
"scopename": "string",
31+
"namespace": "string",
32+
"variables": [
33+
{ "name": "string", "value", "string" }
34+
]
35+
}
36+
* **lvl** - `NUMBER` - the level of the current scope object. 0 is the most-outter-scope.
37+
* **scopename** - `STRING` - the name of the current scope object. May be an empty string if the `scopeName` command never was used or scope was created without a scope name.
38+
* **namespace** - `STRING` - the namespace this scope lives in. Most of the time, this will be missionNamespace. May change with eg. `with NAMESPACE do {...}` operators.
39+
* **options** - `OBEJCT` - Simple object containing informations about the current position that gets executed. Information may not be available, which is when `available` will be false.
40+
* **variables** - `ARRAY` - Simple key-value array containing the private variables (those starting with underscore `_`) as object with the fields `name` for the key and `value` for the value.

docs/Debugger/get-status.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/* REQUEST */
2+
{
3+
"mode": "get-status",
4+
"data": null
5+
}
6+
/* RESPONSE */
7+
{
8+
"mode": "status",
9+
"data": "string" /* HALT | RUNNING | DONE | NA */
10+
}

docs/Debugger/get-status.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
## Request Schema
2+
{
3+
"mode": "get-status",
4+
"data": null
5+
}
6+
- **mode** - `get-status` - always required, tells the debugger that this is a get-status request.
7+
- **data** - `null` - always required, null as the get-status request does not has any further data requirements.
8+
9+
## Response Schema
10+
{
11+
"mode": "status",
12+
"data": "string"
13+
}
14+
* **mode** - `callstack` - always set, tells the receiving end that this is a callstack-object in the `data` field
15+
* **data** - `STRING` - always set, either `HALT`, `RUNNING`, `DONE` or `NA`.
16+
17+
18+
#### HALT
19+
Halt means that the server currently is in breakmode.
20+
21+
#### RUNNING
22+
Server currently executes code.
23+
24+
#### DONE
25+
Same as `HALT` but with different meaning.
26+
Always set when the server ran out of code it may run.
27+
28+
#### NA
29+
Set when the server could not determine the exact status of the current execution.

docs/Debugger/get-variables.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/* REQUEST */
2+
{
3+
"mode": "get-variables",
4+
"data": [
5+
{
6+
"name": "varname", /* Variablename */
7+
"scope": "string" /* Required to be one of the following: [missionNamespace, uiNamespace, profileNamespace, parsingNamespace] */
8+
},
9+
{
10+
"name": "_varname", /* Variablename */
11+
"scope": -1 /* Stack Location (determines starting point, 0 is top most, -N is N levels lower) */
12+
}
13+
]
14+
}
15+
/* RESPONSE */
16+
{
17+
"mode": "variables",
18+
"data": [
19+
{ "name": "string", "value": "string" }
20+
]
21+
}

docs/Debugger/get-variables.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
## Request Schema
2+
{
3+
"mode": "get-variables",
4+
"data": [
5+
{
6+
"name": "varname",
7+
"scope": "global"
8+
},
9+
{
10+
"name": "_varname",
11+
"scope": -1
12+
}
13+
]
14+
}
15+
- **mode** - `get-variables` - always required, tells the debugger that this is a get-variables request.
16+
- **data** - `ARRAY` - always required, contains all variables you want to receive as VariableRequest objects.
17+
18+
## Response Schema
19+
{
20+
"mode": "variables",
21+
"data": [
22+
{ "name": "string", "value": "string" }
23+
]
24+
}
25+
* **mode** - `variables` - always set, tells the receiving end that this is a variables-response in the `data` field
26+
* **data** - `ARRAY` - always set, simple key-value array containing the private variables (those starting with underscore `_`) as object with the fields `name` for the key and `value` for the value.
27+
28+
#### The VariableRequest Object
29+
{
30+
"name": "varname",
31+
"scope": "string"
32+
}
33+
/* OR */
34+
{
35+
"name": "_varname",
36+
"scope": -1
37+
}
38+
* **name** - `STRING` - The name of the variable requested.
39+
* **scope** - `STRING` - The scope this is requesting from. Needs to be one of the following enum values: [missionNamespace, uiNamespace, profileNamespace, parsingNamespace]
40+
* **scope** - `NUMBER` - Stack Location. Telling the debugger where to start the variable search. 0 is the most inner scope, -N is N levels outter.

docs/Debugger/load-sqf.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
## Request Schema
2+
{
3+
"mode": "load-sqf",
4+
"data": { "path": "string", "name": "string" }
5+
}
6+
- **mode** - `load-sqf` - always required, tells the debugger that this is a load-sqf request.
7+
- **data** - `OBJECT` - always required, object containing the field `path` being the path to the file to parse local to the VM and the field `name` containing file name.
8+
9+
10+
No response will be send.

0 commit comments

Comments
 (0)