c 客户端, vscode
s 服务端, 调试器
----------------------------------------------
c--> 客户端,请求调试器初始化
{
"command": "initialize",
"arguments": {
"clientID": "vscode",
"clientName": "Visual Studio Code",
"adapterID": "go",
"pathFormat": "path",
"linesStartAt1": true,
"columnsStartAt1": true,
"supportsVariableType": true,
"supportsVariablePaging": true,
"supportsRunInTerminalRequest": true,
"locale": "zh-cn",
"supportsProgressReporting": true,
"supportsInvalidatedEvent": true,
"supportsMemoryReferences": true,
"supportsArgsCanBeInterpretedByShell": true,
"supportsMemoryEvent": true,
"supportsStartDebuggingRequest": true
},
"type": "request",
"seq": 1
}
s--> 调试器,输出
{
"seq": 0,
"type": "event",
"event": "output",
"body": {
"category": "console",
"output": "Starting: /data/repo/golang/gopath/bin/dlv dap --listen=127.0.0.1:43811 --log-dest=3 from /home/john/wsp/vscodewp/vscode-go-review/sampleWorkspace\n"
}
}
s--> 调试器,事件,输出
{
"seq": 0,
"type": "event",
"event": "output",
"body": {
"category": "console",
"output": "DAP server listening at: 127.0.0.1:43811\n"
}
}
s--> 调试器,应答
{
"seq": 0,
"type": "response",
"request_seq": 1,
"success": true,
"command": "initialize",
"body": {
"supportsConfigurationDoneRequest": true,
"supportsFunctionBreakpoints": true,
"supportsConditionalBreakpoints": true,
"supportsEvaluateForHovers": true,
"supportsSetVariable": true,
"supportsExceptionInfoRequest": true,
"supportsDelayedStackTraceLoading": true,
"supportsLogPoints": true,
"supportsDisassembleRequest": true,
"supportsClipboardContext": true,
"supportsSteppingGranularity": true,
"supportsInstructionBreakpoints": true
}
}
c--> vscode,请求,launch启动
{
"command": "launch",
"arguments": {
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "debug",
"program": ".",
"__configurationTarget": 6,
"packagePathToGoModPathMap": {
"/home/john/wsp/vscodewp/vscode-go-review/sampleWorkspace": "/home/john/wsp/vscodewp/vscode-go-review/sampleWorkspace"
},
"debugAdapter": "dlv-dap",
"showRegisters": false,
"showGlobalVariables": false,
"substitutePath": [
],
"showLog": false,
"logOutput": "debugger",
"dlvFlags": [
],
"hideSystemGoroutines": false,
"dlvToolPath": "/data/repo/golang/gopath/bin/dlv",
"env": {
"GOPATH": "/data/repo/golang/gopath"
},
"__buildDir": "/home/john/wsp/vscodewp/vscode-go-review/sampleWorkspace",
"__sessionId": "7499259c-d87a-4fdf-b72c-0e12317153d2"
},
"type": "request",
"seq": 2
}
s--> 调试器,事件,初始化完成
{
"seq": 0,
"type": "event",
"event": "initialized"
}
s--> 调试器,应答
{
"seq": 0,
"type": "response",
"request_seq": 2,
"success": true,
"command": "launch"
}
c--> vscode, 请求,设置断点
{
"command": "setBreakpoints",
"arguments": {
"source": {
"name": "main.go",
"path": "/home/john/wsp/vscodewp/vscode-go-review/sampleWorkspace/main.go"
},
"lines": [
6,
8,
12
],
"breakpoints": [
{
"line": 6
},
{
"line": 8
},
{
"line": 12
}
],
"sourceModified": false
},
"type": "request",
"seq": 3
}
c--> vscode,请求,设置函数断点
{
"command": "setFunctionBreakpoints",
"arguments": {
"breakpoints": [
]
},
"type": "request",
"seq": 4
}
c-->
{
"command": "setInstructionBreakpoints",
"arguments": {
"breakpoints": [
]
},
"type": "request",
"seq": 5
}
s-->
{
"seq": 0,
"type": "response",
"request_seq": 3,
"success": true,
"command": "setBreakpoints",
"body": {
"breakpoints": [
{
"id": 1,
"verified": true,
"source": {
"name": "main.go",
"path": "/home/john/wsp/vscodewp/vscode-go-review/sampleWorkspace/main.go"
},
"line": 6
},
{
"id": 2,
"verified": true,
"source": {
"name": "main.go",
"path": "/home/john/wsp/vscodewp/vscode-go-review/sampleWorkspace/main.go"
},
"line": 8
},
{
"id": 3,
"verified": true,
"source": {
"name": "main.go",
"path": "/home/john/wsp/vscodewp/vscode-go-review/sampleWorkspace/main.go"
},
"line": 12
}
]
}
}
s-->
{
"seq": 0,
"type": "response",
"request_seq": 4,
"success": true,
"command": "setFunctionBreakpoints",
"body": {
"breakpoints": [
]
}
}
s-->
{
"seq": 0,
"type": "response",
"request_seq": 5,
"success": true,
"command": "setInstructionBreakpoints",
"body": {
"breakpoints": [
]
}
}
c-->
{
"command": "configurationDone",
"type": "request",
"seq": 6
}
s-->
{
"seq": 0,
"type": "event",
"event": "output",
"body": {
"category": "console",
"output": "Type 'dlv help' for list of commands.\n",
"source": {
}
}
}
s-->
{
"seq": 0,
"type": "response",
"request_seq": 6,
"success": true,
"command": "configurationDone"
}
c-->
{
"command": "threads",
"type": "request",
"seq": 7
}
s-->
{
"seq": 0,
"type": "response",
"request_seq": 7,
"success": true,
"command": "threads",
"body": {
"threads": [
{
"id": -1,
"name": "Current"
}
]
}
}
s-->
{
"seq": 0,
"type": "event",
"event": "stopped",
"body": {
"reason": "breakpoint",
"threadId": 1,
"allThreadsStopped": true,
"hitBreakpointIds": [
1
]
}
}
c-->
{
"command": "threads",
"type": "request",
"seq": 8
}
s-->
{
"seq": 0,
"type": "response",
"request_seq": 8,
"success": true,
"command": "threads",
"body": {
"threads": [
{
"id": 1,
"name": "* [Go 1] main.main (Thread 1830529)"
},
{
"id": 2,
"name": "[Go 2] runtime.gopark"
},
{
"id": 3,
"name": "[Go 3] runtime.gopark"
},
{
"id": 4,
"name": "[Go 4] runtime.gopark"
},
{
"id": 5,
"name": "[Go 5] runtime.runfinq"
}
]
}
}
s-->
{
"seq": 0,
"type": "event",
"event": "stopped",
"body": {
"reason": "step",
"threadId": 1,
"allThreadsStopped": true
}
}
c-->
{
"command": "scopes",
"arguments": {
"frameId": 1000
},
"type": "request",
"seq": 24
}
s-->
{
"seq": 0,
"type": "response",
"request_seq": 24,
"success": false,
"command": "scopes",
"message": "Unable to list locals",
"body": {
"error": {
"id": 2005,
"format": "Unable to list locals: unknown frame id 1000",
"showUser": false
}
}
}
c-->
{
"command": "stackTrace",
"arguments": {
"threadId": 1,
"startFrame": 1,
"levels": 19
},
"type": "request",
"seq": 25
}
c-->
{
"command": "next",
"arguments": {
"threadId": 1
},
"type": "request",
"seq": 26
}
s-->
{
"seq": 0,
"type": "response",
"request_seq": 25,
"success": true,
"command": "stackTrace",
"body": {
"stackFrames": [
{
"id": 1000,
"name": "runtime.main",
"source": {
"name": "proc.go",
"path": "/opt/my-apps/go/src/runtime/proc.go"
},
"line": 250,
"column": 0,
"instructionPointerReference": "0x43a253",
"presentationHint": "subtle"
},
{
"id": 1001,
"name": "runtime.goexit",
"source": {
"name": "asm_amd64.s",
"path": "/opt/my-apps/go/src/runtime/asm_amd64.s"
},
"line": 1598,
"column": 0,
"instructionPointerReference": "0x466d61",
"presentationHint": "subtle"
}
],
"totalFrames": 3
}
}
s--> {"seq":0,"type":"event","event":"continued","body":{"threadId":1,"allThreadsContinued":true}}
s--> {"seq":0,"type":"response","request_seq":26,"success":true,"command":"next"}
s--> {"seq":0,"type":"event","event":"stopped","body":{"reason":"step","threadId":1,"allThreadsStopped":true}}
s--> {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"结果: 3\n"}}
c--> {"command":"threads","type":"request","seq":27}
s--> {"seq":0,"type":"response","request_seq":27,"success":true,"command":"threads","body":{"threads":[{"id":1,"name":"* [Go 1] main.main (Thread 1830529)"},{"id":2,"name":"[Go 2] runtime.gopark"},{"id":3,"name":"[Go 3] runtime.gopark"},{"id":4,"name":"[Go 4] runtime.gopark"},{"id":5,"name":"[Go 5] runtime.gopark"}]}}
c--> {"command":"stackTrace","arguments":{"threadId":1,"startFrame":0,"levels":1},"type":"request","seq":28}
s--> {"seq":0,"type":"response","request_seq":28,"success":true,"command":"stackTrace","body":{"stackFrames":[{"id":1000,"name":"main.main","source":{"name":"main.go","path":"/home/john/wsp/vscodewp/vscode-go-review/sampleWorkspace/main.go"},"line":14,"column":0,"instructionPointerReference":"0x49d248"}],"totalFrames":51}}
c--> {"command":"scopes","arguments":{"frameId":1000},"type":"request","seq":29}
s--> {"seq":0,"type":"response","request_seq":29,"success":true,"command":"scopes","body":{"scopes":[{"name":"Locals","variablesReference":1000,"expensive":false,"source":{}}]}}
c--> {"command":"variables","arguments":{"variablesReference":1000},"type":"request","seq":30}
s--> {"seq":0,"type":"response","request_seq":30,"success":true,"command":"variables","body":{"variables":[{"name":"a","value":"1","type":"int","presentationHint":{},"evaluateName":"a","variablesReference":0},{"name":"b","value":"2","type":"int","presentationHint":{},"evaluateName":"b","variablesReference":0},{"name":"c","value":"3","type":"int","presentationHint":{},"evaluateName":"c","variablesReference":0}]}}
c--> {"command":"stackTrace","arguments":{"threadId":1,"startFrame":1,"levels":19},"type":"request","seq":31}
s--> {"seq":0,"type":"response","request_seq":31,"success":true,"command":"stackTrace","body":{"stackFrames":[{"id":1001,"name":"runtime.main","source":{"name":"proc.go","path":"/opt/my-apps/go/src/runtime/proc.go"},"line":250,"column":0,"instructionPointerReference":"0x43a253","presentationHint":"subtle"},{"id":1002,"name":"runtime.goexit","source":{"name":"asm_amd64.s","path":"/opt/my-apps/go/src/runtime/asm_amd64.s"},"line":1598,"column":0,"instructionPointerReference":"0x466d61","presentationHint":"subtle"}],"totalFrames":3}}
c--> {"command":"threads","type":"request","seq":32}
s--> {"seq":0,"type":"response","request_seq":32,"success":true,"command":"threads","body":{"threads":[{"id":1,"name":"* [Go 1] main.main (Thread 1830529)"},{"id":2,"name":"[Go 2] runtime.gopark"},{"id":3,"name":"[Go 3] runtime.gopark"},{"id":4,"name":"[Go 4] runtime.gopark"},{"id":5,"name":"[Go 5] runtime.gopark"}]}}
c--> {"command":"stackTrace","arguments":{"threadId":1,"startFrame":0,"levels":1},"type":"request","seq":33}
s--> {"seq":0,"type":"response","request_seq":33,"success":true,"command":"stackTrace","body":{"stackFrames":[{"id":1003,"name":"main.main","source":{"name":"main.go","path":"/home/john/wsp/vscodewp/vscode-go-review/sampleWorkspace/main.go"},"line":14,"column":0,"instructionPointerReference":"0x49d248"}],"totalFrames":51}}
c--> {"command":"scopes","arguments":{"frameId":1003},"type":"request","seq":34}
s--> {"seq":0,"type":"response","request_seq":34,"success":true,"command":"scopes","body":{"scopes":[{"name":"Locals","variablesReference":1001,"expensive":false,"source":{}}]}}
c--> {"command":"variables","arguments":{"variablesReference":1001},"type":"request","seq":35}
s--> {"seq":0,"type":"response","request_seq":35,"success":true,"command":"variables","body":{"variables":[{"name":"a","value":"1","type":"int","presentationHint":{},"evaluateName":"a","variablesReference":0},{"name":"b","value":"2","type":"int","presentationHint":{},"evaluateName":"b","variablesReference":0},{"name":"c","value":"3","type":"int","presentationHint":{},"evaluateName":"c","variablesReference":0}]}}
c--> {"command":"stackTrace","arguments":{"threadId":1,"startFrame":1,"levels":19},"type":"request","seq":36}
s--> {"seq":0,"type":"response","request_seq":36,"success":true,"command":"stackTrace","body":{"stackFrames":[{"id":1004,"name":"runtime.main","source":{"name":"proc.go","path":"/opt/my-apps/go/src/runtime/proc.go"},"line":250,"column":0,"instructionPointerReference":"0x43a253","presentationHint":"subtle"},{"id":1005,"name":"runtime.goexit","source":{"name":"asm_amd64.s","path":"/opt/my-apps/go/src/runtime/asm_amd64.s"},"line":1598,"column":0,"instructionPointerReference":"0x466d61","presentationHint":"subtle"}],"totalFrames":3}}
c--> {"command":"threads","type":"request","seq":37}
s--> {"seq":0,"type":"response","request_seq":37,"success":true,"command":"threads","body":{"threads":[{"id":1,"name":"* [Go 1] main.main (Thread 1830529)"},{"id":2,"name":"[Go 2] runtime.gopark"},{"id":3,"name":"[Go 3] runtime.gopark"},{"id":4,"name":"[Go 4] runtime.gopark"},{"id":5,"name":"[Go 5] runtime.gopark"}]}}
c--> {"command":"stackTrace","arguments":{"threadId":1,"startFrame":0,"levels":1},"type":"request","seq":38}
s--> {"seq":0,"type":"response","request_seq":38,"success":true,"command":"stackTrace","body":{"stackFrames":[{"id":1006,"name":"main.main","source":{"name":"main.go","path":"/home/john/wsp/vscodewp/vscode-go-review/sampleWorkspace/main.go"},"line":14,"column":0,"instructionPointerReference":"0x49d248"}],"totalFrames":51}}
c--> {"command":"scopes","arguments":{"frameId":1006},"type":"request","seq":39}
s--> {"seq":0,"type":"response","request_seq":39,"success":true,"command":"scopes","body":{"scopes":[{"name":"Locals","variablesReference":1002,"expensive":false,"source":{}}]}}
c--> {"command":"variables","arguments":{"variablesReference":1002},"type":"request","seq":40}
s--> {"seq":0,"type":"response","request_seq":40,"success":true,"command":"variables","body":{"variables":[{"name":"a","value":"1","type":"int","presentationHint":{},"evaluateName":"a","variablesReference":0},{"name":"b","value":"2","type":"int","presentationHint":{},"evaluateName":"b","variablesReference":0},{"name":"c","value":"3","type":"int","presentationHint":{},"evaluateName":"c","variablesReference":0}]}}
c--> {"command":"stackTrace","arguments":{"threadId":1,"startFrame":1,"levels":19},"type":"request","seq":41}
s--> {"seq":0,"type":"response","request_seq":41,"success":true,"command":"stackTrace","body":{"stackFrames":[{"id":1007,"name":"runtime.main","source":{"name":"proc.go","path":"/opt/my-apps/go/src/runtime/proc.go"},"line":250,"column":0,"instructionPointerReference":"0x43a253","presentationHint":"subtle"},{"id":1008,"name":"runtime.goexit","source":{"name":"asm_amd64.s","path":"/opt/my-apps/go/src/runtime/asm_amd64.s"},"line":1598,"column":0,"instructionPointerReference":"0x466d61","presentationHint":"subtle"}],"totalFrames":3}}
c--> {"command":"next","arguments":{"threadId":1},"type":"request","seq":42}
s--> {"seq":0,"type":"event","event":"continued","body":{"threadId":1,"allThreadsContinued":true}}
s--> {"seq":0,"type":"response","request_seq":42,"success":true,"command":"next"}
s--> {"seq":0,"type":"event","event":"stopped","body":{"reason":"step","threadId":1,"allThreadsStopped":true}}
c--> {"command":"threads","type":"request","seq":43}
s--> {"seq":0,"type":"response","request_seq":43,"success":true,"command":"threads","body":{"threads":[{"id":1,"name":"* [Go 1] main.main (Thread 1830529)"},{"id":2,"name":"[Go 2] runtime.gopark"},{"id":3,"name":"[Go 3] runtime.gopark"},{"id":4,"name":"[Go 4] runtime.gopark"},{"id":5,"name":"[Go 5] runtime.gopark"}]}}
c--> {"command":"stackTrace","arguments":{"threadId":1,"startFrame":0,"levels":1},"type":"request","seq":44}
s--> {"seq":0,"type":"response","request_seq":44,"success":true,"command":"stackTrace","body":{"stackFrames":[{"id":1000,"name":"main.main","source":{"name":"main.go","path":"/home/john/wsp/vscodewp/vscode-go-review/sampleWorkspace/main.go"},"line":17,"column":0,"instructionPointerReference":"0x49d24a"}],"totalFrames":51}}
c--> {"command":"scopes","arguments":{"frameId":1000},"type":"request","seq":45}
s--> {"seq":0,"type":"response","request_seq":45,"success":true,"command":"scopes","body":{"scopes":[{"name":"Locals","variablesReference":1000,"expensive":false,"source":{}}]}}
c--> {"command":"variables","arguments":{"variablesReference":1000},"type":"request","seq":46}
s--> {"seq":0,"type":"response","request_seq":46,"success":true,"command":"variables","body":{"variables":[{"name":"a","value":"1","type":"int","presentationHint":{},"evaluateName":"a","variablesReference":0},{"name":"b","value":"2","type":"int","presentationHint":{},"evaluateName":"b","variablesReference":0},{"name":"c","value":"3","type":"int","presentationHint":{},"evaluateName":"c","variablesReference":0}]}}
c--> {"command":"stackTrace","arguments":{"threadId":1,"startFrame":1,"levels":19},"type":"request","seq":47}
s--> {"seq":0,"type":"response","request_seq":47,"success":true,"command":"stackTrace","body":{"stackFrames":[{"id":1001,"name":"runtime.main","source":{"name":"proc.go","path":"/opt/my-apps/go/src/runtime/proc.go"},"line":250,"column":0,"instructionPointerReference":"0x43a253","presentationHint":"subtle"},{"id":1002,"name":"runtime.goexit","source":{"name":"asm_amd64.s","path":"/opt/my-apps/go/src/runtime/asm_amd64.s"},"line":1598,"column":0,"instructionPointerReference":"0x466d61","presentationHint":"subtle"}],"totalFrames":3}}
c--> {"command":"next","arguments":{"threadId":1},"type":"request","seq":48}
s--> {"seq":0,"type":"event","event":"continued","body":{"threadId":1,"allThreadsContinued":true}}
s--> {"seq":0,"type":"response","request_seq":48,"success":true,"command":"next"}
s--> {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"end\n"}}
s--> {"seq":0,"type":"event","event":"stopped","body":{"reason":"step","threadId":1,"allThreadsStopped":true}}
c--> {"command":"threads","type":"request","seq":49}
s--> {"seq":0,"type":"response","request_seq":49,"success":true,"command":"threads","body":{"threads":[{"id":1,"name":"* [Go 1] main.main (Thread 1830529)"},{"id":2,"name":"[Go 2] runtime.gopark"},{"id":3,"name":"[Go 3] runtime.gopark"},{"id":4,"name":"[Go 4] runtime.gopark"},{"id":5,"name":"[Go 5] runtime.gopark"}]}}
c--> {"command":"stackTrace","arguments":{"threadId":1,"startFrame":0,"levels":1},"type":"request","seq":50}
s--> {"seq":0,"type":"response","request_seq":50,"success":true,"command":"stackTrace","body":{"stackFrames":[{"id":1000,"name":"main.main","source":{"name":"main.go","path":"/home/john/wsp/vscodewp/vscode-go-review/sampleWorkspace/main.go"},"line":18,"column":0,"instructionPointerReference":"0x49d2a5"}],"totalFrames":51}}
c--> {"command":"scopes","arguments":{"frameId":1000},"type":"request","seq":51}
s--> {"seq":0,"type":"response","request_seq":51,"success":true,"command":"scopes","body":{"scopes":[{"name":"Locals","variablesReference":1000,"expensive":false,"source":{}}]}}
c--> {"command":"variables","arguments":{"variablesReference":1000},"type":"request","seq":52}
s--> {"seq":0,"type":"response","request_seq":52,"success":true,"command":"variables","body":{"variables":[{"name":"a","value":"1","type":"int","presentationHint":{},"evaluateName":"a","variablesReference":0},{"name":"b","value":"2","type":"int","presentationHint":{},"evaluateName":"b","variablesReference":0},{"name":"c","value":"3","type":"int","presentationHint":{},"evaluateName":"c","variablesReference":0}]}}
c--> {"command":"stackTrace","arguments":{"threadId":1,"startFrame":1,"levels":19},"type":"request","seq":53}
s--> {"seq":0,"type":"response","request_seq":53,"success":true,"command":"stackTrace","body":{"stackFrames":[{"id":1001,"name":"runtime.main","source":{"name":"proc.go","path":"/opt/my-apps/go/src/runtime/proc.go"},"line":250,"column":0,"instructionPointerReference":"0x43a253","presentationHint":"subtle"},{"id":1002,"name":"runtime.goexit","source":{"name":"asm_amd64.s","path":"/opt/my-apps/go/src/runtime/asm_amd64.s"},"line":1598,"column":0,"instructionPointerReference":"0x466d61","presentationHint":"subtle"}],"totalFrames":3}}
c--> {"command":"next","arguments":{"threadId":1},"type":"request","seq":54}
s--> {"seq":0,"type":"event","event":"continued","body":{"threadId":1,"allThreadsContinued":true}}
s--> {"seq":0,"type":"response","request_seq":54,"success":true,"command":"next"}
s--> {"seq":0,"type":"event","event":"stopped","body":{"reason":"step","threadId":1,"allThreadsStopped":true}}
c--> 请求
{
"command": "threads",
"type": "request",
"seq": 55
}
s--> 响应
{
"seq": 0,
"type": "response",
"request_seq": 55,
"success": true,
"command": "threads",
"body": {
"threads": [
{
"id": 1,
"name": "* [Go 1] runtime.main (Thread 1830529)"
},
{
"id": 2,
"name": "[Go 2] runtime.gopark"
},
{
"id": 3,
"name": "[Go 3] runtime.gopark"
},
{
"id": 4,
"name": "[Go 4] runtime.gopark"
},
{
"id": 5,
"name": "[Go 5] runtime.gopark"
}
]
}
}
c--> 请求
{
"command": "stackTrace",
"arguments": {
"threadId": 1,
"startFrame": 0,
"levels": 1
},
"type": "request",
"seq": 56
}
s--> 堆栈
{
"seq": 0,
"type": "response",
"request_seq": 56,
"success": true,
"command": "stackTrace",
"body": {
"stackFrames": [
{
"id": 1000,
"name": "runtime.main",
"source": {
"name": "proc.go",
"path": "/opt/my-apps/go/src/runtime/proc.go"
},
"line": 260,
"column": 0,
"instructionPointerReference": "0x43a253",
"presentationHint": "subtle"
}
],
"totalFrames": 51
}
}
c--> 请求
{
"command": "stackTrace",
"arguments": {
"threadId": 1,
"startFrame": 1,
"levels": 19
},
"type": "request",
"seq": 57
}
s--> 响应
{
"seq": 0,
"type": "response",
"request_seq": 57,
"success": true,
"command": "stackTrace",
"body": {
"stackFrames": [
{
"id": 1001,
"name": "runtime.goexit",
"source": {
"name": "asm_amd64.s",
"path": "/opt/my-apps/go/src/runtime/asm_amd64.s"
},
"line": 1598,
"column": 0,
"instructionPointerReference": "0x466d61",
"presentationHint": "subtle"
}
],
"totalFrames": 2
}
}
c-->
{
"command": "scopes",
"arguments": {
"frameId": 1000
},
"type": "request",
"seq": 58
}
s-->
{
"seq": 0,
"type": "response",
"request_seq": 58,
"success": true,
"command": "scopes",
"body": {
"scopes": [
{
"name": "Locals (warning: optimized function)",
"variablesReference": 1000,
"expensive": false,
"source": {
}
}
]
}
}
c--> 变量
{
"command": "variables",
"arguments": {
"variablesReference": 1000
},
"type": "request",
"seq": 59
}
s--> 变量
{
"seq": 0,
"type": "response",
"request_seq": 59,
"success": true,
"command": "variables",
"body": {
"variables": [
{
"name": "mp",
"value": "*runtime.m {g0: *runtime.g {stack: (*runtime.stack)(0x53c7c0), stackguard0: 140721418760232, stackguard1: 140721418760232, _panic: *runtime._panic nil, _defer: *runtime._defer nil, m: *(*runtime.m)(0x53cb60), sched: (*runtime.gobuf)(0x53c7f8), syscallsp: 0...",
"type": "*runtime.m",
"presentationHint": {
},
"evaluateName": "mp",
"variablesReference": 1001
},
{
"name": "needUnlock",
"value": "(unreadable empty OP stack)",
"type": "bool",
"presentationHint": {
},
"evaluateName": "needUnlock",
"variablesReference": 0
},
{
"name": "fn",
"value": "(unreadable empty OP stack)",
"type": "func()",
"presentationHint": {
},
"evaluateName": "fn",
"variablesReference": 0
}
]
}
}
c--> 请求
{
"command": "continue",
"arguments": {
"threadId": 1
},
"type": "request",
"seq": 60
}
s--> 响应
{
"seq": 0,
"type": "response",
"request_seq": 60,
"success": true,
"command": "continue",
"body": {
"allThreadsContinued": true
}
}
s--> 事件
{
"seq": 0,
"type": "event",
"event": "terminated",
"body": {
}
}
c--> 请求
{
"command": "disconnect",
"arguments": {
"restart": false
},
"type": "request",
"seq": 61
}
s--> 事件
{
"seq": 0,
"type": "event",
"event": "output",
"body": {
"category": "console",
"output": "Process 1830529 has exited with status 0\n",
"source": {
}
}
}
s--> 事件
{
"seq": 0,
"type": "event",
"event": "output",
"body": {
"category": "console",
"output": "Detaching\n",
"source": {
}
}
}
s--> 响应
{
"seq": 0,
"type": "response",
"request_seq": 61,
"success": true,
"command": "disconnect"
}
s--> 事件
{
"seq": 0,
"type": "event",
"event": "terminated",
"body": {
}
}
s--> 事件
{
"seq": 0,
"type": "event",
"event": "output",
"body": {
"category": "console",
"output": "dlv dap (1830402) exited with code: 0\n"
}
}
标签:插件,name,seq,vscode,request,--,command,type,调试器
From: https://www.cnblogs.com/jiftle/p/17881199.html