Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

378
Visualizações
VSCODE: No debug adapter, can not send 'variables'"

I'm getting started with pupeteer and node and using vscode in win 10. I'm trying to log into a site and scrape a table. So far I have:

(async () => {

const browser = await puppeteer.launch({
  headless: false,
});
var page = await browser.newPage();
await page.goto('thesite.com/login/');

await page.click(USERNAME_SELECTOR);

await page.keyboard.type(CREDS.username);

await page.click(PASSWORD_SELECTOR);
await page.keyboard.type(CREDS.password);

await page.click(BUTTON_SELECTOR);
await page.waitForNavigation();

const TABLE_ROW_SELECTOR = '.gv-container.gv-container-133 > table > tbody';
await page.waitForSelector(TABLE_ROW_SELECTOR);

await page.waitForSelector(TABLE_ROW_SELECTOR);


await page.screenshot({ path: 'example.png' });  
const data = await page.evaluate(SELECTOR => document.querySelectorAll(SELECTOR), TABLE_ROW_SELECTOR);




await browser.close();
})();

This is mostly working. however in my console I see a list of objects but as far as I can tell no values. Heres the fiest object:

0:Object {}
__proto__:Object {constructor: , __defineGetter__: , __defineSetter__: , …}
__defineGetter__:function __defineGetter__() { … }
__defineSetter__:function __defineSetter__() { … }
__lookupGetter__:function __lookupGetter__() { … }
__lookupSetter__:function __lookupSetter__() { … }
constructor:function Object() { … }
hasOwnProperty:function hasOwnProperty() { … }
No debug adapter, can not send 'variables'
isPrototypeOf:function isPrototypeOf() { … }
No debug adapter, can not send 'variables'

What does " No debug adapter, can not send 'variables'" mean?

edit:

I updated to the latest vscode and checked that all extensions were updated. Now when I run LAUNCH PROGRAM

E:\nodejs\node.exe --inspect-brk=27108 index.js 
Debugger listening on ws://127.0.0.1:27108/e5928c71-370c-  4111-9ec3-77bb2cd85075
For help, see: https://nodejs.org/en/docs/inspector
(node:12844) ExperimentalWarning: The fs.promises API is experimental
warning.js:18
Array(25) [ElementHandle, ElementHandle, ElementHandle, ElementHandle,    ElementHandle, ElementHandle, ElementHandle, ElementHandle, …]
index.js:64
length:25
__proto__:Array(0) [, …]
concat:function concat() { … }
[[Scopes]]:Scopes[0]
arguments:TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them

Any idea what this means?

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

The reason this happens is that the debugger stops after the code execution ends. Then there is no more debug adapter available to send the variables. What I did is add an extra line on the bottom of the code execution, and set a breakpoint on that. It isn't pretty, but it works.

over 4 years ago · Santiago Trujillo Relatório

0

I had this issue when trying to use the integratedConsole rather than integratedTerminal or externalTerminal as part of my Node configuration within launch.json:

Setting it back to:

"console": "integratedTerminal"

Fixed it. Only took an hour to figure out. See docs for more information.

over 4 years ago · Santiago Trujillo Relatório

0

You can also try:

"outputCapture": "std"

in your launch.json

Here is reference on Github

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda