变量调试可视化工具

一款VSCode扩展,用于在调试过程中自动将变量以图像形式展示,支持自定义图像类型配置。

  • by takahc
  • JavaScript
  • 本地部署
  • 更新于
在 GitHub 查看 takahc/debugger-mcp-vscode

使用说明

调试变量操作 README

一个用于调试变量的VSCode扩展

特点/功能

自动显示图片

在调试过程中,当达到断点时,右侧会自动打开一个面板。该面板以图像形式显示变量。

要求

  • 在设置中启用此扩展

扩展设置

此扩展提供了以下设置:

  • debug-variable-actions.config.enable启用/禁用此扩展。
  • debug-variable-actions.config.image-types配置原始图像类型

图像类型

示例用于 MyImage

typedef struct {
    int width;
    int height;
    unsigned char *data;
} MyImage;

在 settings.json 中添加以下内容。

...
    "debug-variable-actions.config.image-types": [
        {
            "display_name": "MyImage",
            "match_types": ["MyImage", "MyImage *"],
            "binary_info": {
                "sizeByte": "width*height*1*1",
                "littleEndian": "true",
                "signed": "false",
                "fixedSize": "false",
                "isInt": "true"
            },
            "image_info": {
                "mem_width": "width",
                "mem_height": "height",
                "image_width": "width",
                "image_height": "height",
                "stride": "width*1",
                "channels": "1",
                "data": "String(((d)=> data.split(' ')[0] )(data))",
                "format": "'GRAY'",
                "bytesForPx": "1"
            }
        }
    ]
...

已知问题

  • 仅针对单通道图像进行了测试
  • 仅测试了C/C++调试器

发行说明

0.*

发布测试