4

如主题所述,我无法在 Visual Studio Code(版本:1.23.0)中安装 Debugger for Chrome 扩展。正如其他帖子中所建议的,我关闭了 VS Code,转到 User.vscode\extensions,删除了对它的任何引用,然后重新启动了 VS Code。我尝试使用命令行并收到此错误(命令: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)
4

1 回答 1

2

这是一个临时解决方案:

于 2018-05-06T16:48:14.013 回答