vscode-js-debug
vscode-js-debug copied to clipboard
Support evaluateName for all variable references
Sometimes, there can be anonymous variable references, like this:
It would be nice if these variable references also have an evaluateName that can act as a js variable name for evaluate calls.
This evaluateName should be safe to use in expression, e.g. myFunction(${myVar.evaluateName}).
This means, before evaluating expressions, these evaluateNames have to be pre-processed.
If you use replaceAll, make sure the evaluateName is long enough (256 bits should be fine) to avoid any accidental replacements.
To be consistent, the evaluateName only works for the given frame id, so you cannot mix variables from different frame ids in one expression.
CDP has these things that might be helpful:
- https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-RemoteObjectId
- https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-callFunctionOn