logo

qt vscode debug 配置

这个项目由两个进程组成,之间通过 dbus 进行沟通。

{
	"version": "2.0.0",
	"tasks": [
		{
			"type": "shell",
			"label": "qmake build makefile",
			"command": "/usr/bin/qmake",
			"args": [
				".."
			],
			"options": {
				"cwd": "${workspaceFolder}/build"
			},
			"problemMatcher": [],
			"group": "build",
		},
		{
			"type": "shell",
			"label": "make build activefile",
			"command": "/usr/bin/make",
			"args": [
				"${nproc}"
			],
			"options": {
				"cwd": "${workspaceFolder}/build"
			},
			"problemMatcher": [],
			"group": "build",
			"dependsOn": [
				"qmake build makefile"
			]
		},
		{
			"type": "shell",
			"label": "launch deepin screen recorder",
			"command": "./build/src/deepin-screen-recorder",
			"args": [],
			"options": {
				"cwd": "${workspaceFolder}"
			},
			"problemMatcher": [],
			"group": "build",
			"dependsOn": []
		}
	]
}
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "deepin-pin-screenshots",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/build/src/pin_screenshots/deepin-pin-screenshots",
            "args": ["--dbus"],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
            "preLaunchTask": "make build activefile",
            "miDebuggerPath": "/usr/bin/gdb",
            "visualizerFile": "${workspaceFolder}/.vscode/qt.natvis",
            "showDisplayString": true,
        }
    ]
}