I think it would be better to have a dedicated ‘Variables’ panel not just a ‘local variables’ button.
Fix: View menu boolean to toggle on/off of variables panel or change ‘local variables’ to just ‘variables’. The variables can be segmented by local/library or by filename using a file tree or drop down within the variables panel or modal.