diff --git a/changelog.d/595.fixed.md b/changelog.d/595.fixed.md new file mode 100644 index 00000000..cbe7b9e3 --- /dev/null +++ b/changelog.d/595.fixed.md @@ -0,0 +1,3 @@ +`get_local_variables` no longer returns JavaScript Global bindings as locals +when a frame exposes no Local or block scope. It returns an empty list with an +`anchorNote` directing callers to `get_scopes` and `get_variables` instead. diff --git a/docs/tool-reference.md b/docs/tool-reference.md index 8d165bfc..b282269d 100644 --- a/docs/tool-reference.md +++ b/docs/tool-reference.md @@ -788,7 +788,7 @@ If the originally stopped thread has no frames, this tool uses the same user-fra **Language-Specific Behavior:** - **Python**: Looks for "Locals" scope, filters out `__builtins__`, special variables, and internal debugger variables -- **JavaScript**: Merges every block scope on the frame — js-debug names them `Block`, `Catch Block`, `With Block` (or the legacy `Block: