【发布时间】:2020-04-19 00:45:33
【问题描述】:
当我尝试在 VSC 中运行调试器时,我不断收到此错误消息。有人可以帮忙吗? 截图如下:
我对编程和学习课程非常陌生,请尽可能保持基本的解释..
这是 JS 文件的代码。我已经使用 Yo Code 和 NPM 生成了一个基本的 Visual Studio 代码扩展。
// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
import { commands, window } from 'vscode';
// this method is called when your extension is activated
// your extension is activated the very first time the command is executed
/**
* @param {vscode.ExtensionContext} context
*/
function activate(context) {
// Use the console to output diagnostic information (console.log) and errors (console.error)
// This line of code will only be executed once when your extension is
activated
console.log('Congratulations, your extension "content-helper" is now
active!');
// The command has been defined in the package.json file
// Now provide the implementation of the command with registerCommand
// The commandId parameter must match the command field in package.json
let disposable = commands.registerCommand('extension.helloWorld', function () {
// The code you place here will be executed every time your command is executed
// Display a message box to the user
window.showInformationMessage('Hello World!');
});
context.subscriptions.push(disposable);
}
const _activate = activate;
export { _activate as activate };
// this method is called when your extension is deactivated
function deactivate() {}
export default {
activate,
deactivate
}
【问题讨论】:
-
请向我们展示导致此错误的代码。否则我们将无法为您提供帮助。
-
当然,我基本上是使用“yo code”和 NPM 来创建一个 Extension。
-
您能否为
lanch.json添加更多信息
标签: javascript visual-studio-code vscode-debugger