Skip to content

Commit 113b68d

Browse files
committed
Expose Debug_rpc.log_src
1 parent 630f405 commit 113b68d

File tree

6 files changed

+19
-11
lines changed

6 files changed

+19
-11
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 1.0.4 (2021-01-02)
2+
3+
### Added
4+
5+
- Added Debug_rpc.log_src to allow to control log level externally
6+
17
## 1.0.3 (2021-01-02)
28

39
### Fixed

debugAdapterProtocol.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@
13081308
},
13091309
"name": {
13101310
"type": "string",
1311-
"description": "The name of the Variable's child to obtain data breakpoint information for.\nIf variableReference isn’t provided, this can be an expression."
1311+
"description": "The name of the Variable's child to obtain data breakpoint information for.\nIf variablesReference isn’t provided, this can be an expression."
13121312
}
13131313
},
13141314
"required": [ "name" ]
@@ -1803,7 +1803,7 @@
18031803
"StackTraceRequest": {
18041804
"allOf": [ { "$ref": "#/definitions/Request" }, {
18051805
"type": "object",
1806-
"description": "The request returns a stacktrace from the current execution state of a given thread.\nA client can request all stack frames by omitting the startFrame and levels arguments. For performance conscious clients stack frames can be retrieved in a piecemeal way with the startFrame and levels arguments. The response of the stackTrace request may contain a totalFrames property that hints at the total number of frames in the stack. If a client needs this total number upfront, it can issue a request for a single (first) frame and depending on the value of totalFrames decide how to proceed. In any case a client should be prepared to receive less frames than requested, which is an indication that the end of the stack has been reached.",
1806+
"description": "The request returns a stacktrace from the current execution state of a given thread.\nA client can request all stack frames by omitting the startFrame and levels arguments. For performance conscious clients and if the debug adapter's 'supportsDelayedStackTraceLoading' capability is true, stack frames can be retrieved in a piecemeal way with the startFrame and levels arguments. The response of the stackTrace request may contain a totalFrames property that hints at the total number of frames in the stack. If a client needs this total number upfront, it can issue a request for a single (first) frame and depending on the value of totalFrames decide how to proceed. In any case a client should be prepared to receive less frames than requested, which is an indication that the end of the stack has been reached.",
18071807
"properties": {
18081808
"command": {
18091809
"type": "string",
@@ -2913,7 +2913,7 @@
29132913
},
29142914
"supportsDelayedStackTraceLoading": {
29152915
"type": "boolean",
2916-
"description": "The debug adapter supports the delayed loading of parts of the stack, which requires that both the 'startFrame' and 'levels' arguments and the 'totalFrames' result of the 'StackTrace' request are supported."
2916+
"description": "The debug adapter supports the delayed loading of parts of the stack, which requires that both the 'startFrame' and 'levels' arguments and an optional 'totalFrames' result of the 'StackTrace' request are supported."
29172917
},
29182918
"supportsLoadedSourcesRequest": {
29192919
"type": "boolean",

src/debug_protocol/debug_protocol.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ module Capabilities = struct
258258
supports_value_formatting_options : bool option [@key "supportsValueFormattingOptions"] [@default None]; (** The debug adapter supports a 'format' attribute on the stackTraceRequest, variablesRequest, and evaluateRequest. *)
259259
supports_exception_info_request : bool option [@key "supportsExceptionInfoRequest"] [@default None]; (** The debug adapter supports the 'exceptionInfo' request. *)
260260
support_terminate_debuggee : bool option [@key "supportTerminateDebuggee"] [@default None]; (** The debug adapter supports the 'terminateDebuggee' attribute on the 'disconnect' request. *)
261-
supports_delayed_stack_trace_loading : bool option [@key "supportsDelayedStackTraceLoading"] [@default None]; (** The debug adapter supports the delayed loading of parts of the stack, which requires that both the 'startFrame' and 'levels' arguments and the 'totalFrames' result of the 'StackTrace' request are supported. *)
261+
supports_delayed_stack_trace_loading : bool option [@key "supportsDelayedStackTraceLoading"] [@default None]; (** The debug adapter supports the delayed loading of parts of the stack, which requires that both the 'startFrame' and 'levels' arguments and an optional 'totalFrames' result of the 'StackTrace' request are supported. *)
262262
supports_loaded_sources_request : bool option [@key "supportsLoadedSourcesRequest"] [@default None]; (** The debug adapter supports the 'loadedSources' request. *)
263263
supports_log_points : bool option [@key "supportsLogPoints"] [@default None]; (** The debug adapter supports logpoints by interpreting the 'logMessage' attribute of the SourceBreakpoint. *)
264264
supports_terminate_threads_request : bool option [@key "supportsTerminateThreadsRequest"] [@default None]; (** The debug adapter supports the 'terminateThreads' request. *)
@@ -1731,7 +1731,7 @@ module Data_breakpoint_info_command = struct
17311731
type t = {
17321732
variables_reference : int option [@key "variablesReference"] [@default None]; (** Reference to the Variable container if the data breakpoint is requested for a child of the container. *)
17331733
name : string; (** The name of the Variable's child to obtain data breakpoint information for.
1734-
If variableReference isn’t provided, this can be an expression. *)
1734+
If variablesReference isn’t provided, this can be an expression. *)
17351735
}
17361736
[@@deriving make, yojson {strict = false}]
17371737
end
@@ -1983,7 +1983,7 @@ module Pause_command = struct
19831983
end
19841984

19851985
(** The request returns a stacktrace from the current execution state of a given thread.
1986-
A client can request all stack frames by omitting the startFrame and levels arguments. For performance conscious clients stack frames can be retrieved in a piecemeal way with the startFrame and levels arguments. The response of the stackTrace request may contain a totalFrames property that hints at the total number of frames in the stack. If a client needs this total number upfront, it can issue a request for a single (first) frame and depending on the value of totalFrames decide how to proceed. In any case a client should be prepared to receive less frames than requested, which is an indication that the end of the stack has been reached. *)
1986+
A client can request all stack frames by omitting the startFrame and levels arguments. For performance conscious clients and if the debug adapter's 'supportsDelayedStackTraceLoading' capability is true, stack frames can be retrieved in a piecemeal way with the startFrame and levels arguments. The response of the stackTrace request may contain a totalFrames property that hints at the total number of frames in the stack. If a client needs this total number upfront, it can issue a request for a single (first) frame and depending on the value of totalFrames decide how to proceed. In any case a client should be prepared to receive less frames than requested, which is an indication that the end of the stack has been reached. *)
19871987
module Stack_trace_command = struct
19881988
let type_ = "stackTrace"
19891989

src/debug_protocol/debug_protocol.mli

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ module Capabilities : sig
198198
supports_value_formatting_options : bool option [@key "supportsValueFormattingOptions"] [@default None]; (** The debug adapter supports a 'format' attribute on the stackTraceRequest, variablesRequest, and evaluateRequest. *)
199199
supports_exception_info_request : bool option [@key "supportsExceptionInfoRequest"] [@default None]; (** The debug adapter supports the 'exceptionInfo' request. *)
200200
support_terminate_debuggee : bool option [@key "supportTerminateDebuggee"] [@default None]; (** The debug adapter supports the 'terminateDebuggee' attribute on the 'disconnect' request. *)
201-
supports_delayed_stack_trace_loading : bool option [@key "supportsDelayedStackTraceLoading"] [@default None]; (** The debug adapter supports the delayed loading of parts of the stack, which requires that both the 'startFrame' and 'levels' arguments and the 'totalFrames' result of the 'StackTrace' request are supported. *)
201+
supports_delayed_stack_trace_loading : bool option [@key "supportsDelayedStackTraceLoading"] [@default None]; (** The debug adapter supports the delayed loading of parts of the stack, which requires that both the 'startFrame' and 'levels' arguments and an optional 'totalFrames' result of the 'StackTrace' request are supported. *)
202202
supports_loaded_sources_request : bool option [@key "supportsLoadedSourcesRequest"] [@default None]; (** The debug adapter supports the 'loadedSources' request. *)
203203
supports_log_points : bool option [@key "supportsLogPoints"] [@default None]; (** The debug adapter supports logpoints by interpreting the 'logMessage' attribute of the SourceBreakpoint. *)
204204
supports_terminate_threads_request : bool option [@key "supportsTerminateThreadsRequest"] [@default None]; (** The debug adapter supports the 'terminateThreads' request. *)
@@ -1388,7 +1388,7 @@ module Data_breakpoint_info_command : sig
13881388
type t = {
13891389
variables_reference : int option [@key "variablesReference"] [@default None]; (** Reference to the Variable container if the data breakpoint is requested for a child of the container. *)
13901390
name : string; (** The name of the Variable's child to obtain data breakpoint information for.
1391-
If variableReference isn’t provided, this can be an expression. *)
1391+
If variablesReference isn’t provided, this can be an expression. *)
13921392
}
13931393
[@@deriving make, yojson {strict = false}]
13941394
end
@@ -1640,7 +1640,7 @@ module Pause_command : sig
16401640
end
16411641

16421642
(** The request returns a stacktrace from the current execution state of a given thread.
1643-
A client can request all stack frames by omitting the startFrame and levels arguments. For performance conscious clients stack frames can be retrieved in a piecemeal way with the startFrame and levels arguments. The response of the stackTrace request may contain a totalFrames property that hints at the total number of frames in the stack. If a client needs this total number upfront, it can issue a request for a single (first) frame and depending on the value of totalFrames decide how to proceed. In any case a client should be prepared to receive less frames than requested, which is an indication that the end of the stack has been reached. *)
1643+
A client can request all stack frames by omitting the startFrame and levels arguments. For performance conscious clients and if the debug adapter's 'supportsDelayedStackTraceLoading' capability is true, stack frames can be retrieved in a piecemeal way with the startFrame and levels arguments. The response of the stackTrace request may contain a totalFrames property that hints at the total number of frames in the stack. If a client needs this total number upfront, it can issue a request for a single (first) frame and depending on the value of totalFrames decide how to proceed. In any case a client should be prepared to receive less frames than requested, which is an indication that the end of the stack has been reached. *)
16441644
module Stack_trace_command : sig
16451645
val type_ : string
16461646

src/debug_rpc/debug_rpc.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
open Debug_protocol
22

3-
let src = Logs.Src.create "dap.rpc.Debug_rpc"
4-
module Log = (val Logs_lwt.src_log src : Logs_lwt.LOG)
3+
let log_src = Logs.Src.create "dap.rpc_lwt"
4+
module Log = (val Logs_lwt.src_log log_src : Logs_lwt.LOG)
55

66
type t = {
77
in_ : Lwt_io.input_channel;

src/debug_rpc/debug_rpc.mli

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
open Debug_protocol
22

3+
val log_src : Logs.Src.t
4+
35
type t
46
(** The type of rpc connection *)
57

0 commit comments

Comments
 (0)