Closed Vadimtro closed 2 years ago
Not the right venue to ask. Probably an issue with vscode generic debugger.
On the client side registerDebugAdapterTrackerFactory
captured the same conversation:
start: 05876ade-1231-40f0-bbfe-75733c858bf1
===> {
"command": "initialize",
"arguments": {
"clientID": "vscode",
"clientName": "Visual Studio Code",
"adapterID": "mock",
"pathFormat": "path",
"linesStartAt1": true,
"columnsStartAt1": true,
"supportsVariableType": true,
"supportsVariablePaging": true,
"supportsRunInTerminalRequest": true,
"locale": "en-us",
"supportsProgressReporting": true,
"supportsInvalidatedEvent": true,
"supportsMemoryReferences": true
},
"type": "request",
"seq": 1
}
<=== {
"seq": 1,
"type": "responce",
"request_seq": 1,
"command": "initialize",
"success": true,
"body": {
"supportsBreakpointLocationsRequest": true,
"supportsCancelRequest": true,
"supportsCompletionsRequest": true,
"completionTriggerCharacters": [
"."
],
"supportsConfigurationDoneRequest": true,
"supportsDataBreakpoints": true,
"supportsDisassembleRequest": true,
"supportsFunctionBreakpoints": true,
"supportsEvaluateForHovers": true,
"supportsExceptionFilterOptions": false,
"supportsExceptionInfoRequest": true,
"supportsInstructionBreakpoints": true,
"supportsRestartFrame": true,
"supportsGotoTargetsRequest": true,
"supportsStepInTargetsRequest": true,
"supportsModulesRequest": true,
"supportsRestartRequest": true,
"supportsExceptionOptions": true,
"supportsValueFormattingOptions": true,
"supportsDelayedStackTraceLoading": true,
"supportsLoadedSourcesRequest": true,
"supportsLogPoints": true,
"supportsReadMemoryRequest": true,
"supportsSetExpression": true,
"supportsSetVariable": true,
"supportsSteppingGranularity": true,
"supportSuspendDebuggee": true,
"supportTerminateDebuggee": true,
"supportsWriteMemoryRequest": true
}
}
<=== {
"seq": 1,
"type": "event",
"event": "initialized"
}
===> {
"command": "setBreakpoints",
"arguments": {
"source": {
"name": "connections.sql",
"path": "c:\\Users\\dim\\git\\vscode-mock-debug\\sampleWorkspace\\menu\\connections.sql"
},
"lines": [
3,
5
],
"breakpoints": [
{
"line": 3
},
{
"line": 5
}
],
"sourceModified": false
},
"type": "request",
"seq": 2
}
<=== {
"seq": 2,
"type": "event",
"event": "stopped",
"body": {
"reason": "entry"
}
}
<=== {
"seq": 2,
"type": "responce",
"request_seq": 2,
"command": "setBreakpoints",
"success": true,
"body": {
"breakpoints": [
{
"verified": true,
"line": 3,
"id": 7
},
{
"verified": false,
"line": 5,
"id": 8
}
]
}
}
<=== {
"seq": 3,
"type": "event",
"event": "breakpoint",
"body": {
"reason": "changed",
"breakpoint": {
"verified": true,
"id": 1
}
}
}
===> {
"command": "threads",
"type": "request",
"seq": 3
}
<=== {
"seq": 3,
"type": "responce",
"request_seq": 3,
"command": "threads",
"success": true,
"body": {
"threads": [
{
"id": 1,
"name": "oNe"
}
]
}
}
I assume it is possible to have debug extension with virtually no custom client side debug adapter code.
Curiously, there seems to be no debugger project satisfying this requirement on github which can be used as a template. This is unlike LSP extensions, where the examples with vscode frontend, and java backend are plenty.
There are many adapters (most actually) that don't require custom client code. That's how there are more clients than just vscode.
Indeed. I have cloned as sample debugging extension https://github.com/Calindro/emulicious-debugger/, which contains only one extension.ts
file. It does little more than just call vscode.debug.startDebugging
but the result is the same as I had before with mock debugger. It must be that the error is somewhere on my server side, but shouldn't it be spotted from the message exchange log?
"type":"responce"
Could the problem be with misspelling "response" or is that just in logging code?
I'm writing a debugging server, which communicates with vscode debugger via port 4711. Here is the transcript of the conversation:
After comparing it with the mock debugging trace, it misses the
attach
orlaunch
request. Also, the client fails to disable the breakpoints which failed to verify, and doesn't proceed tosetDataBreakpoints
. I'm sending the stopped event in desperate attempt to advance the protocol workflow, but it is also stuck, as I'm not receiving the stacktrace request.Please advice.