gpt4 book ai didi

visual-studio-code - 无法将 Chrome 调试器安装到 Visual Studio Code 中

转载 作者:行者123 更新时间:2023-12-01 15:14:41 25 4
gpt4 key购买 nike

正如主题所读,我无法在 Visual Studio Code(版本:1.23.0)中安装 Debugger for Chrome 扩展。正如其他帖子中所建议的那样,我关闭了 VS Code,转到 User.vscode\extensions,删除对它的任何引用,然后重新启动 VS Code。我尝试使用命令行并收到此错误
(命令:代码 --install-extension msjsdiag.debugger-for-chrome):

$ code --install-extension msjsdiag.debugger-for-chrome
Found 'msjsdiag.debugger-for-chrome' in the marketplace.
Installing...
WARNING: Promise with no error callback:256
{ exception: null,
error:
{ Error: ENOENT: no such file or directory, open 'C:\Users\SOMEUSER\.vscode\extensions\.msjsdiag.debugger-for-chrome-4.4.0\node_modules\vscode-chrome-debug-core\out\src\(*&)))&^.js'
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\\Users\\SOMEUSER\\.vscode\\extensions\\.msjsdiag.debugger-for-chrome-4.4.0\\node_modules\\vscode-chrome-debug-core\\out\\src\\(*&)))&^.js' },
promise:
{ _oncancel: null,
_nextState: null,
_state:
{ name: 'error',
enter: [Function: enter],
cancel: [Function: s],
done: null,
then: null,
_completed: [Function: s],
_error: [Function: s],
_notify: [Function: v],
_progress: [Function: s],
_setCompleteValue: [Function: s],
_setErrorValue: [Function: s] },
_listeners: null,
_value:
{ Error: ENOENT: no such file or directory, open 'C:\Users\SOMEUSER\.vscode\extensions\.msjsdiag.debugger-for-chrome-4.4.0\node_modules\vscode-chrome-debug-core\out\src\(*&)))&^.js'
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\\Users\\SOMEUSER\\.vscode\\extensions\\.msjsdiag.debugger-for-chrome-4.4.0\\node_modules\\vscode-chrome-debug-core\\out\\src\\(*&)))&^.js' },
_isException: false,
_errorId: 256,
done: [Function: done],
then: [Function: then] },
handler: undefined,
id: 256,
parent: undefined }
C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\node\cli.js:58
define(e[9],t([1,0,2]),function(e,t,n){"use strict";function r(e){i(e)||t.errorHandler.onUnexpectedError(e)}function i(e){return e instanceof Error&&e.name===u&&e.message===u}Object.defineProperty(t,"__esModule",{value:!0});var o={};n.TPromise.addEventListener("error",function(e){var t=e.detail,n=t.id;t.parent?t.handler&&o&&delete o[n]:(o[n]=t,1===Object.keys(o).length&&setTimeout(function(){var e=o;o={},Object.keys(e).forEach(function(t){var n=e[t];n.exception?r(n.exception):n.error&&r(n.error),console.log("WARNING: Promise with no error callback:"+n.id),console.log(n),n.exception&&console.log(n.exception.stack)})},0))});var s=function(){function e(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(function(){if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e},0)}}return e.prototype.addListener=function(e){var t=this;return this.listeners.push(e),function(){t._removeListener(e)}},e.prototype.emit=funct

Error: ENOENT: no such file or directory, open 'C:\Users\SOMEUSER\.vscode\extensions\.msjsdiag.debugger-for-chrome-4.4.0\node_modules\vscode-chrome-debug-core\out\src\(*&)))&^.js'

Error: ENOENT: no such file or directory, open 'C:\Users\SOMEUSER\.vscode\extensions\.msjsdiag.debugger-for-chrome-4.4.0\node_modules\vscode-chrome-debug-core\out\src\(*&)))&^.js'
at Timeout._onTimeout (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\node\cli.js:58:758)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)

最佳答案

这是一个临时解决方案:

  • 关闭 VS 代码
  • 在文件资源管理器中转到 %UserProfile%\.vscode\extensions
    删除 .msjsdiag.debugger-for-chrome-4.4.1 目录
  • 启动 VS 代码
  • 从 VS Code 中的 EXTENSIONS 菜单禁用自动更新扩展
  • 从这里下载以前的版本:https://msjsdiag.gallery.vsassets.io/_apis/public/gallery/publisher/msjsdiag/extension/debugger-for-chrome/4.3.0/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage
  • 将文件重命名为 .vsix 扩展名
  • 从 VS Code 的 EXTENSIONS 菜单中选择“从 VSIX 安装”,然后选择刚刚重命名的文件
  • 关于visual-studio-code - 无法将 Chrome 调试器安装到 Visual Studio Code 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50184838/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com