Vendor specific debug protocol commands [message #1148919] |
Mon, 21 October 2013 16:46  |
Eclipse User |
|
|
|
I see that the DBGp protocol (xdebug.org/docs-dbgp.php#extended-commands) talks a little about how vendor specific commands are to be named. Is there any guidance on implementing those commands in your LDT client or server?
Specifically, how would you recommend the LDT plugins be changed to accomodate vendor specific commands? And is there a preferred integration point in debugger.lua for doing the same -- like calling out to a vendor-specific module or do we need to change our version of debugger.lua to handle these cases?
Thanks very much
Dan Jackson
|
|
|
|
|
Re: Vendor specific debug protocol commands [message #1152093 is a reply to message #1148919] |
Wed, 23 October 2013 16:24   |
Eclipse User |
|
|
|
Hi Dan,
It depends of what you are trying to accomplish.
If you want to be able to inspect some custom userdata, a new feature called "inspectors" will be integrated soon in LDT. It will allow you to provide a custom introspection function which decode customs objects (read only for now). See the associated bug for details. Basically a quite simple Lua hook can decode any custom table or userdata.
But if you want to really add commands, like Simon said, you have to add support of it on both debugger and IDE sides. There is no strict policy about adding extra features to DBGp protocol, LDT does this for coroutine handling: a new command "coroutine_list" has been added, and some standards commands takes an extra "-o" parameter to operate on a paused coroutine.
Adding a command in debugger is not so complex, just an extra handle to add in "debugger.commands" (you can monkey patch it, modifying source is not needed).
On IDE side, it's a bit more cumbersome as most of DBGp support is provided by DLTK framework and extending it may be difficult (coroutine management required a ton of hacks IIRC).
|
|
|
|
Powered by
FUDForum. Page generated in 0.02489 seconds