Change "LexicalBlock" back to "Scope".
The former is *technically* more formally correct, but other debuggers (VS Code and V8, among others) already use the term "scope" to refer to the same concept so aligning with those existing debuggers has value.
@@ -175,22 +175,13 @@ message Frame {
// The name of the function that this frame represents.
string function_name = 1;
- // The lexical blocks that contain value bindings accessible in this frame.
- repeated LexicalBlock lexical_block = 2;
+ // The scopes that contain value bindings accessible in this frame.
+ repeated Scope scope = 2;
// The source location where the frame is currently paused.
Location location = 3;
}
-// A lexical block that contains value bindings accessible in a frame.
-message LexicalBlock {
- // A human-readable name of the lexical block, such as "global" or "local".
- string name = 1;
-
- // The variable bindings that are defined in this lexical block.
- repeated Value binding = 2;
-}
-
// A location in Skylark source code.
message Location {
// The path of the Skylark source file.
@@ -200,6 +191,15 @@ message Location {
uint32 line_number = 2;
}
+// A scope that contains value bindings accessible in a frame.
+message Scope {
+ // A human-readable name of the scope, such as "global" or "local".
+ string name = 1;
+
+ // The variable bindings that are defined in this scope.
+ repeated Value binding = 2;
+}
+
// Describes the stepping behavior that should occur when execution of a thread
// is continued.
enum Stepping {
