You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Why debugger.sendCommand("DOM.getDocument") not working from rendered process #5443
Hello,
In rendered process I want to use DOM method in sendCommand, but not working.
my code is:
var remote = require('remote'), wc= remote.getCurrentWebContents();
wc.debugger.sendCommand("DOM.getDocument", {}, function (err, res) {
console.log(err); // not work
console.log(res); // not work
})
Thank you @zcbenz
but i get this error: Debugger attach failed : Error: Could not call remote function 'attach'. Check that the function signature is correct. Underlying error: Another debugger is already attached to this target Error: Could not call remote function 'attach'. Check that the function signature is correct. Underlying error: Another debugger is already attached to this target at callFunction (C:\Users\Administrator.WIN-K5IA7RTF2VJ\Desktop\KM\client\engine\resources\electron.asar\browser\rpc-server.js:229:11) at EventEmitter....
If you have devtools opened for this target, then you would receive this error on attaching. Only one debugger can be attached to a target currently and devtools takes precendence. This is a limitation on chromium side.
Activity
deepak1556 commentedon May 8, 2016
The debugger should be attached before sending commands.
hahamed commentedon May 11, 2016
Thank you @zcbenz
but i get this error:
Debugger attach failed : Error: Could not call remote function 'attach'. Check that the function signature is correct. Underlying error: Another debugger is already attached to this target Error: Could not call remote function 'attach'. Check that the function signature is correct. Underlying error: Another debugger is already attached to this target at callFunction (C:\Users\Administrator.WIN-K5IA7RTF2VJ\Desktop\KM\client\engine\resources\electron.asar\browser\rpc-server.js:229:11) at EventEmitter....deepak1556 commentedon May 11, 2016
If you have devtools opened for this target, then you would receive this error on attaching. Only one debugger can be attached to a target currently and devtools takes precendence. This is a limitation on chromium side.
hahamed commentedon May 12, 2016
very very thanks
lishoulong commentedon Jun 7, 2018
chrome 63 Chrome Extensions using the chrome.debugger API can now run at the same time as DevTools. Does Electron support the 63 Chrome?
rr13k commentedon Sep 27, 2020
hi, I try "electron": "^9.0.0" in use webcontext.debugger.sendCommand() in webviewTag
It doesn't work properly
previously it in "electron": "^4.1.0" is ok,
I tried his command in electron ^9. Nothing happened to him
@zcbenz
please tell me , Why is it happen?