In web development, I always found it useful that I could get read, write and execution access to variables and functions via the browser's development console at runtime. For example, if I have a
var foo = 3;
in my code, then I could do this at runtime:
Is there a mechanism to do the same thing in Electron with elements from the render scope? While Electron has the Chromium development console, trying the above gives a Uncaught ReferenceError: foo is not defined.
(By render scope, I refer to elements defined in the render.js file that runs in the browser window I opened the console in. The script is included via <script> require('./render.js'); </script> at the end of the HTML body.)
from Debugging in Electron: how can I access render-scope objects from the console?

No comments:
Post a Comment