
We want to provide more flexibility for users to make changes to their configurations while the debug session is running. This could be accomplished by creating a custom request, but that were require a new UI as well, and every client of dlv dap to provide its own UI for this. By using the evaluate context, users can use the already existing debug console to change their configurations. This change includes a refactor of the terminal code in order to share the code with the dap package. This change provides a very similar to UI as the terminal package, but there are different configuration options that are DAP specific. We plan to use this same mechanism to expose a few other commands including "sources" to help users debug an ineffective substitutePath configuration.
35 lines
1.1 KiB
Go
35 lines
1.1 KiB
Go
package dap
|
|
|
|
// Unique identifiers for messages returned for errors from requests.
|
|
// These values are not mandated by DAP (other than the uniqueness
|
|
// requirement), so each implementation is free to choose their own.
|
|
const (
|
|
UnsupportedCommand int = 9999
|
|
InternalError int = 8888
|
|
NotYetImplemented int = 7777
|
|
|
|
// Where applicable and for consistency only,
|
|
// values below are inspired the original vscode-go debug adaptor.
|
|
FailedToLaunch = 3000
|
|
FailedToAttach = 3001
|
|
FailedToInitialize = 3002
|
|
UnableToSetBreakpoints = 2002
|
|
UnableToDisplayThreads = 2003
|
|
UnableToProduceStackTrace = 2004
|
|
UnableToListLocals = 2005
|
|
UnableToListArgs = 2006
|
|
UnableToListGlobals = 2007
|
|
UnableToLookupVariable = 2008
|
|
UnableToEvaluateExpression = 2009
|
|
UnableToHalt = 2010
|
|
UnableToGetExceptionInfo = 2011
|
|
UnableToSetVariable = 2012
|
|
UnableToDisassemble = 2013
|
|
UnableToListRegisters = 2014
|
|
UnableToRunDlvCommand = 2015
|
|
// Add more codes as we support more requests
|
|
NoDebugIsRunning = 3000
|
|
DebuggeeIsRunning = 4000
|
|
DisconnectError = 5000
|
|
)
|