Closed wwbenayed closed 12 months ago
Very interesting. The extensions runs a ContextQuery as part of the initial handshake. It seems your TCF agent does not have a ContextQuery service at all!
We can fallback to RunControl. Will include a fix for this in the next release.
In the mean time you can probably comment that part in handshake
.
PS: Also note your debugger is most likely not compliant. It should either return an error response or disconnect once it got a command for an unsupported TCF service.
I removed the ContextQuery from the handshake. Now, seams it try to set a breakpoint but with empty parameters. So, an error is returned:
15:38:51 TCF debug session initialized
15:38:51 Launch request [object Object]
15:38:51 Connected!
15:38:51 ➡️ Sending ELocator Hello ["Locator"]
15:38:51 ⬅️ Received Locator Hello ["ZeroCopy","T32_OsAwareness","DPrintf","Profiler","Streams","LineNumbers","MemoryMap","Memory","Breakpoints","Expressions","WR_SymbolsList","Symbols","StackTrace","Disassembly","PathMap","Registers","RunControl","Locator"]
15:38:51 ➡️ Sending CBreakpoints/0 Breakpoints set[]
15:39:10 Bad packed: first zero at index 74 {"Code":30,"Time":1699627150782,"Format":"Exception in message handler"}
Heh, I guess you could either fix the debugger (https://download.eclipse.org/tools/tcf/tcf-docs/TCF%20Service%20-%20Breakpoints.html#CmdSet expressly allows empty arrays) or set some breakpoint in VSCode so the list isn't empty.
Fixed in the latest update. The handshake does fallback to RunControl.
In TCF, Breakpoints must, at least, have an ID. So, an empty list is not accepted. I tried to set a breakpoint in VSCode, but I still get an empty list.
According to the TCF spec https://download.eclipse.org/tools/tcf/tcf-docs/TCF%20Service%20-%20Breakpoints.html#CmdSet , an empty array and even null
is a valid argument.
If you have your breakpoint set in VSCode it should be sent with set
.
I tried to connect the extension to a running TRACE32 debugger (with TCF enabled) This is the log I get:
Increasing Timeout is not helpful.