开发vs代码扩展时如何查看错误?

时间:2020-02-19 05:06:07

标签: typescript d3.js visual-studio-code vscode-extensions

对不起,如果这是重复的,我尝试搜索SO,但我严重找不到答案。

我正在尝试为使用D3的vs代码编写扩展。到目前为止,我什么都没有,只是我的extension.ts:

import * as vscode from 'vscode';

import * as d3 from 'd3';

export function activate(context: vscode.ExtensionContext) {
    context.subscriptions.push(
      vscode.commands.registerCommand('catCoding.start', () => {
        // Create and show a new webview
        const panel = vscode.window.createWebviewPanel(
          'catCoding', // Identifies the type of the webview. Used internally
          'Cat Coding', // Title of the panel displayed to the user
          vscode.ViewColumn.One, // Editor column to show the new webview panel in.
          {} // Webview options. More on these later.
        );

        let data = [30, 86, 168, 281, 303, 365];
        d3.select("chart")
            .selectAll("div")
            .data(data)
            .enter()
            .append("div")
            .style("width", function(d) { return d + "px"; })
            .text(function(d) { return d; });
        })
    );
  }


// this method is called when your extension is deactivated
export function deactivate() {}

当我运行它并调用命令时,我收到一条消息: enter image description here

就是这样,控制台中没有报告任何错误(在4个选项卡中的任何一个中),没有其他通知...

如何查看所发生事件的详细输出?您知道,某些堆栈跟踪,导致错误的行,除了“您的代码不起作用”以外的任何内容。

0 个答案:

没有答案