Seek for another way to send custom responses
Clarification and motivation
To send custom requests (not mentioned in the DAP spec) we currently use a dedicated DebuggerClient
module, and it uses vscode-debugadapter-testsupport
package inside to send responses.
This solution has several drawbacks:
- Generally, we get completely two ways of doing things. If now I want to e.g. preprocess all the requests, I will have to apply preprocessing logic in two places - in built-in requests submission and in this
DebuggerClient
. - How error responses are processed by our solution is simply wrong. The library we use does not care about structured
Response.body
and only takesResponse.message
into account. This causes issues, e.g. requiring us to useinheritMessageField
which is not appropriate from the DAP spec's standpoint.
Note that LIGO Debugger suffers from the same issues, it had to workaround some of the mentioned concerns (e.g. add a dedicated errors handling at frontend).
Also, note that there is a TODO in the code about this.
Acceptance criteria
- We use a uniform and correct solution for handling both built-in and custom requests.