未实现的控制台API:未定义,Visual Studio代码调试中的错误

时间:2021-11-21 02:51:40

After updating my Windows, I am now encountering an error while debugging Ionic App on Visual Studio Code. Every time it passes the statement console.log, it prints the error "Unimplemented console API: undefined". Do you have any ideas on how to fix it?

更新我的Windows后,我在Visual Studio Code上调试Ionic App时遇到错误。每次通过语句console.log时,它都会输出错误“Unimplemented console API:undefined”。你对如何解决它有任何想法吗?

1 个解决方案

#1


0  

There is a bug in vscode-chrome-debug as pointed out by Jimmy Thomson on there Github Issue page!

如Jimmy Thomson在Github Issue页面上指出的那样,vscode-chrome-debug中存在一个错误!

Here is the Dirty fix by Jimmy Thomson:

这是Jimmy Thomson的Dirty修复:

  1. Go to your vscode extension directory, either C:\Users\.vscode\extensions\ or ~/.vscode/extensions, then go to vsmobile.cordova-tools-1.2.3/node_modules/vscode-chrome-debug-core/out/src/chrome/ and open up consoleHelper.js.
  2. 转到你的vscode扩展目录,C:\ Users \ .vscode \ extensions \或〜/ .vscode / extensions,然后转到vsmobile.cordova-tools-1.2.3 / node_modules / vscode-chrome-debug-core / out / src / chrome /并打开consoleHelper.js。

  3. Look around line 37 for outputText = 'Unimplemented console API: ' + m.type;
  4. 查看第37行的outputText ='未实现的控制台API:'+ m.type;

  5. change that to outputText = 'Unimplemented console API: ' + JSON.stringify(m);
  6. 将其更改为outputText ='未实现的控制台API:'+ JSON.stringify(m);

#1


0  

There is a bug in vscode-chrome-debug as pointed out by Jimmy Thomson on there Github Issue page!

如Jimmy Thomson在Github Issue页面上指出的那样,vscode-chrome-debug中存在一个错误!

Here is the Dirty fix by Jimmy Thomson:

这是Jimmy Thomson的Dirty修复:

  1. Go to your vscode extension directory, either C:\Users\.vscode\extensions\ or ~/.vscode/extensions, then go to vsmobile.cordova-tools-1.2.3/node_modules/vscode-chrome-debug-core/out/src/chrome/ and open up consoleHelper.js.
  2. 转到你的vscode扩展目录,C:\ Users \ .vscode \ extensions \或〜/ .vscode / extensions,然后转到vsmobile.cordova-tools-1.2.3 / node_modules / vscode-chrome-debug-core / out / src / chrome /并打开consoleHelper.js。

  3. Look around line 37 for outputText = 'Unimplemented console API: ' + m.type;
  4. 查看第37行的outputText ='未实现的控制台API:'+ m.type;

  5. change that to outputText = 'Unimplemented console API: ' + JSON.stringify(m);
  6. 将其更改为outputText ='未实现的控制台API:'+ JSON.stringify(m);