delve/Documentation/api
Alessandro Arzilli 7afda8dbe0 proc,service: remove support for locspec '<fnname>:0' (#1588)
The location specified '<fnname>:0' could be used to set a breakpoint
on the entry point of the function (as opposed to locspec '<fnname>'
which sets it after the prologue).
Setting a breakpoint on an entry point is almost never useful, the way
this feature was implemented could cause it to be used accidentally and
there are other ways to accomplish the same task (by setting a
breakpoint on the PC address directly).
2019-06-25 13:50:05 -07:00
..
json-rpc *: Update import name to github.com/go-delve/delve 2019-01-04 19:43:13 +01:00
ClientHowto.md proc,service: remove support for locspec '<fnname>:0' (#1588) 2019-06-25 13:50:05 -07:00
README.md documentation: API documentation improvements (#507) 2016-04-24 10:18:02 -07:00

API Documentation

Delve exposes an API interface so that other programs, mostly IDEs and editors, can interact with Delve programmatically. The API is used by the terminal client, so will always stay up to date in lockstep regardless of new features.

Usage

In order to run Delve in "API mode", simply invoke with one of the standard commands, providing the --headless flag, like so:

$ dlv debug --headless --api-version=2 --log --listen=127.0.0.1:8181

This will start the debugger in a non-interactive mode, listening on the specified address, and will enable logging. The last two flags are optional, of course.

Optionally, you may also specify the --accept-multiclient flag if you would like to connect multiple clients to the API.

You can connect the headless debugger from Delve itself using the connect subcommand:

$ dlv connect 127.0.0.1:8181

This can be useful for remote debugging.

API Interfaces

Delve has been architected in such a way as to allow multiple client/server implementations. All of the "business logic" as it were is abstracted away from the actual client/server implementations, allowing for easy implementation of new API interfaces.

Current API Interfaces