最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - No debug adapter, can not send 'variables VSCODE - Stack Overflow

programmeradmin2浏览0评论

In debug console writes this :

Debugger listening on ws://127.0.0.1:55624/c4f74411-66ec-44b2-9cf6-15efb60f8611 For help, see: Debugger attached.

(3) [Array(2), Array(2), Array(2)] No debug adapter, can not send 'variables'

i will be grateful if you help me :)

In debug console writes this :

Debugger listening on ws://127.0.0.1:55624/c4f74411-66ec-44b2-9cf6-15efb60f8611 For help, see: https://nodejs/en/docs/inspector Debugger attached.

(3) [Array(2), Array(2), Array(2)] No debug adapter, can not send 'variables'

i will be grateful if you help me :)

Share Improve this question asked Sep 8, 2020 at 22:18 Маргарита ГеоргиеваМаргарита Георгиева 311 silver badge4 bronze badges 1
  • stackoverflow./questions/61817528/… – epascarello Commented Sep 8, 2020 at 22:21
Add a ment  | 

1 Answer 1

Reset to default 5

This happens because your program ends very quickly and the VS Code console tries to display an object from your program (you have probably tried to console.log it, right?)

Objects are not transferred from your program to the debugger, and VS Code have to query them when you're expanding it in the console.

Unfortunately, current latest VS Code version is not able to prevent node process to exit. So you have couple of options:

  • ignore the error, it should affect only debugger console
  • add a breakpoint in the end of your program, so that flush of console happens before node process exit
  • use another debugger, e.g. Chrome's inspector
  • use raw values in console output, e.g. do console.log(JSON.stringify({ x: 5, y: 6 })) instead of console.log({ x: 5, y: 6 })
  • create an issue in VS Code repo and wait for it to be fixed
  • fix the issue by yourself, look for node's RuntimeAgent::notify_when_waiting_for_disconnect_ event, which should be used
发布评论

评论列表(0)

  1. 暂无评论