[#1888] Fix disappearing variables in the debugger
Motivation and Context
Problem
If the variable is unused in the further stepping then it disappears from the variables pane. Sometimes it becomes annoying because it requires to do some step backs to see this variable again.
Solution
Suppress strengthening pass in the compiler when optimizations are turned off.
Note
This suppression breaks shadowing. Now we can see all instances of the same named variables. It's questionable how to fix this (or should we?).
Related issues
Resolves #1888 (closed) .
✅ Checklist for the LIGO Debugger
-
Tests
-
Bug fixes and new features have corresponding tests added
-
-
Documentation
- I checked whether I should update the docs and did so if necessary:
-
README files (root, adapter, and plugin) -
Haddock & plugin's code documentation -
Other documents
-
- I checked whether I should update the docs and did so if necessary:
-
launch.json
config (if updated)-
I keep the format of launch.json
(in package.json) synced with how the plugin code and the adapter's code work with this configuration. -
If I changed values in the initial configuration for launch.json
, I also searched for them in code and updated accordingly. I keep the default configurations and default values for not listed fields in match.
-
-
Breaking changes (if applied)
-
If I introduced changes that are not compatible with the older versions of ligo
, I updated our version restrictions according to the respective document.
-
Description
Component
-
compiler -
website -
webide -
vscode-plugin -
debugger
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Breaking change (fix or feature that would cause existing functionality to not work as expected) -
Performance improvement (non-breaking change that improves performance) -
None (change with no changelog)
Changelog
Fixed a bug with disappearing variables when they become unused. Now you can see them through the whole stepping (if they are in scope).
Checklist:
-
Changes follow the existing coding style (use dune @fmt
to check). -
Tests for the changes have been added (for bug fixes / feature). -
Documentation has been updated. -
Changelog description has been added (if appropriate). -
Start titles under ## Changelog
section with #### (if appropriate). -
There is no image or uploaded file in changelog -
Examples in changed behaviour have been added to the changelog (for breaking change / feature).