Skip to content
| Marketplace
Sign in
Visual Studio Code>Debuggers>QG DebugNew to Visual Studio Code? Get it now.
QG Debug

QG Debug

Preview

MelonTeam

|
3,567 installs
| (0) | Free
VSCode debug plugin for QGraph engine on Android and iOS platform
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

QG Debugger for VS Code

QG Debugger是一个VS Code的插件,这个插件允许开发者去运行JS,并且使用Launch 或者 Attach模式,在VS Code环境中调试QG的Javascript工程。

Features

  • 调试中逐行代码的Step
  • 设置断点
  • 查看变量
  • 查看Log [ console.log ]
  • 在发生异常时Break

Requirements

  • 调试QG工程需要工程中有qg.js文件,如果没有则无法调试。默认会在被调试工程的根目录寻找qg.js,如果不在则需要开发者在根目录下新建debug_config.json并配置qg.js路径。
  • 开发者需要指定工程一开始就需要加载的JS文件,默认会在被调试工程的根目录寻找默认的的入口文件index.js,如果开发者需要自定义入口文件,也需要在debug_config.json配置。
  • debug_config.json的格式如下
{
    "qg_js_path" : "/qg_dir/qg.js",
    "main_js_path" : "/main_js_dir/main.js" // 如果有多个可以写成数组的形式
}

Limitations

  • 为保证调试端代码和手机端代码的一致性,需要将整个调试工程push到手机的sdcard上调试,默认的路径为/sdcard/tencent/qg/debugger/proj/
  • 当前还不支持setVariables和watchVariables。
  • 当前还不支持JS Function的展开。

Extension Settings

该插件允许你在launch.json里配置启动参数,配置完成后就可以进行debug你的JS工程了。 一般的启动参数是按照如下格式配置的:

{
    "version": "0.2.0",
    "configurations": [
        {
            // launch模式启动
            "type": "QG",
            "name": "launch",
            "request": "launch",
            "projectPath": "${workspaceRoot}",  // 指定工程根目录,默认为vscode打开目录
            "platform": "Android",
        },
        {
            // attach模式启动
            "type": "QG",
            "name": "attach",
            "request": "attach",
            "projectPath": "${workspaceRoot}",
            "platform": "Android"
        }
    ]
}

Questions / Problems

Launch Android App

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft