Comments (9)
Thanks to your hints, I can confirm that one a handler is added for setVariable
, I can successfully get the set variable workflow run in Eclipse IDE.
from vscode-chrome-debug-core.
@EricCornelson I think that we lost a handler for this request with your refactoring.
from vscode-chrome-debug-core.
Got it, I'll take a look
from vscode-chrome-debug-core.
And @mickaelistria from the error after the handler is fixed, it sounds like variablesReference
is not included which I think should be the variablesReference for the scope.
from vscode-chrome-debug-core.
Sorry, I'm getting a bit lost here ;).
Do you confirm the Unrecognized request: setVariable",
is a bug in the debug adapter?
About the unhandledRejection
after my tweak, variablesReference
here is what I get as result of variables
{"seq":95,"type":"response","request_seq":12,"command":"variables","success":true,"body":{"variables":[{"name":"this","value":"Object","type":"Object","variablesReference":1015,"evaluateName":"this"},{"name":"__dirname","value":"\"/home/mistria/workspace-demo/l\"","variablesReference":0,"evaluateName":"__dirname","type":"string"},{"name":"__filename","value":"\"/home/mistria/workspace-demo/l/blah.js\"","variablesReference":0,"evaluateName":"__filename","type":"string"},{"name":"[[StableObjectId]]","value":"1","variablesReference":0,"evaluateName":"[[StableObjectId]]","type":"number"},{"name":"exports","value":"Object {}","type":"Object","variablesReference":1012,"evaluateName":"exports"},{"name":"module","value":"Module {id: \".\", exports: Object, parent: null, …}","type":"Object","variablesReference":1014,"evaluateName":"module"},{"name":"n","value":"4","variablesReference":0,"evaluateName":"n","type":"number"},{"name":"require","value":"function require(path) { … }","type":"Function","variablesReference":1013,"evaluateName":"require"}]}}
The interesting part is {"name":"n","value":"4","variablesReference":0,"evaluateName":"n","type":"number"}
, and in this interesting part, I see variablesReference=0
. I guess one reason is that this variable doesn't have children, but it seems to prevent the setVariable
to work later.
Here is the request sent by my IDE for setVariable
{"type":"request","seq":13,"command":"setVariable","arguments":{"variablesReference":0,"name":"n","value":"5","format":{}}}
Which seems correct per se: the variablesReference
re-uses the value received earlier, I just imagine this 0
retrieved from the Debug Adapter may be wrong.
from vscode-chrome-debug-core.
An important thing I forgot to mention: I'm using version 6.7.55 which is extracted transitively from VSCode with node-debug2 1.33.0.
from vscode-chrome-debug-core.
Another interesting part about this variablesReference=0
is that it's assigned to multiple variables. Here we see for instance __filename
, __dirname
and [[StableObjectId]]
and my local n
that have the same variablesReference=0. This is defintely a bug, however it doesn't seem related to the initial one about Unrecognized request: setVariable
, so if you prefer, I can open a new bug for the variablesReference=0
after Unrecognized request: setVariable
is resolved.
from vscode-chrome-debug-core.
Yeah the "unrecognized request" is our bug.
The variablesReference
of 0 is misleading - it only has a "real" value for objects. Primitive values have it set to 0. For setVariable
, it needs to be set to the variablesReference for the parent scope of the variable being set. Because we are just looking up a variable based on its scope and name.
from vscode-chrome-debug-core.
The 'variablesReferenceof 0 is misleading - it only has a "real" value for objects. Primitive values have it set to 0. ForsetVariable`, it needs to be set to the variablesReference for the parent scope of the variable being set. Because we are just looking up a variable based on its scope and name.
Thanks, that's very helpful. I may have some more questions later, but that already unblocks many things on my end.
from vscode-chrome-debug-core.
Related Issues (20)
- Rely upon Target domain instead of the json/list for page discovery and engagement
- Consider deprecating CRDPMultiplexor HOT 2
- Error processing "completions": Error: not available HOT 3
- Hermes debugger problems HOT 6
- Is it possible to move location of ClientApp folder (or even change it's name)? HOT 1
- Improve multi-target debugging for Chrome/Node HOT 2
- Redundant inline breakpoints on Expo app debugging in VS Code HOT 5
- Error processing "breakpointLocations" HOT 10
- Add more exceptions handling for breakpoints position requests for inline breakpoints HOT 6
- Variable hovers sometimes stop showing up HOT 9
- Breakpoints sometimes don't get hit HOT 3
- Compile error with using [email protected] HOT 1
- Chrome debugger crashes immediately HOT 2
- Devtools opens automatically on launch and won't close HOT 1
- sourcemap failing inside vscode but working inside chrome devtools HOT 10
- sourceRoot override config HOT 10
- Error: EMFILE: too many open files
- Stack Trace shows localhost in links HOT 9
- consider adding vscode-debugger-extension-for-office-addins to the README.md HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-chrome-debug-core.