Sprinter: добавить отладку C-исходников и интеграцию VS Code
This commit is contained in:
@@ -0,0 +1,170 @@
|
||||
{
|
||||
"name": "sprinter-mame-debug",
|
||||
"displayName": "Sprinter MAME Debug",
|
||||
"description": "Сборка и DAP-отладка C-приложений Sprinter в MAME",
|
||||
"version": "0.2.0",
|
||||
"publisher": "sprinter-c-compiler",
|
||||
"engines": {"vscode": "^1.85.0"},
|
||||
"categories": ["Debuggers"],
|
||||
"main": "./extension.js",
|
||||
"activationEvents": ["onDebug", "onTaskType:sprinter", "onCommand:sprinter.buildActive"],
|
||||
"contributes": {
|
||||
"commands": [
|
||||
{"command": "sprinter.buildActive", "title": "Sprinter: Build Active Project"}
|
||||
],
|
||||
"taskDefinitions": [
|
||||
{
|
||||
"type": "sprinter",
|
||||
"required": ["project"],
|
||||
"properties": {
|
||||
"project": {
|
||||
"type": "string",
|
||||
"description": "Путь к каталогу с Makefile приложения относительно workspace"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"problemMatchers": [
|
||||
{
|
||||
"name": "sprinter-sdcc",
|
||||
"owner": "sprinter-sdcc",
|
||||
"fileLocation": "relative",
|
||||
"pattern": {
|
||||
"regexp": "^(.+?):(\\d+):\\s+(error|warning)\\s+(\\d+):\\s+(.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"severity": 3,
|
||||
"code": 4,
|
||||
"message": 5
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration": {
|
||||
"title": "Sprinter MAME Debug",
|
||||
"properties": {
|
||||
"sprinterDebugger.pythonCommand": {
|
||||
"type": "string",
|
||||
"default": "auto",
|
||||
"description": "Python 3.12 для DAP; auto выбирает local pyenv shim без зависимости от PATH GUI"
|
||||
},
|
||||
"sprinterDebugger.pythonArguments": {
|
||||
"type": "array",
|
||||
"items": {"type": "string"},
|
||||
"default": [],
|
||||
"description": "Аргументы пользовательской Python-команды перед путём DAP-адаптера"
|
||||
}
|
||||
}
|
||||
},
|
||||
"debuggers": [
|
||||
{
|
||||
"type": "sprinter-mame",
|
||||
"label": "Sprinter MAME",
|
||||
"languages": ["c"],
|
||||
"configurationAttributes": {
|
||||
"launch": {
|
||||
"required": ["build"],
|
||||
"properties": {
|
||||
"build": {
|
||||
"type": "string",
|
||||
"description": "Путь к каталогу .sprinter-cc-NAME"
|
||||
},
|
||||
"project": {
|
||||
"type": "string",
|
||||
"description": "Каталог с Makefile для сборки перед запуском; определяется из build, если не задан"
|
||||
},
|
||||
"autoBuild": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Добавить Sprinter build task перед F5, когда найден app.mk"
|
||||
},
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {"type": "string"},
|
||||
"description": "Дополнительные файлы на debug-дискету"
|
||||
},
|
||||
"mame": {
|
||||
"type": "string",
|
||||
"description": "Путь к mame.arm"
|
||||
},
|
||||
"debugger": {
|
||||
"type": "string",
|
||||
"default": "sdbg",
|
||||
"enum": ["sdbg", "auto", "osx", "windows", "qt", "imgui"],
|
||||
"enumDescriptions": [
|
||||
"Только окно Sprinter и управление из VS Code",
|
||||
"Выбрать доступный штатный backend MAME",
|
||||
"VS Code вместе с Cocoa debugger MAME на macOS",
|
||||
"VS Code вместе с native debugger MAME на Windows",
|
||||
"Qt debugger MAME, если сборка включает USE_QTDEBUG",
|
||||
"Debugger MAME внутри основного графического окна"
|
||||
],
|
||||
"description": "OSD debugger provider; sdbg не открывает Cocoa debugger"
|
||||
},
|
||||
"launchAt": {
|
||||
"type": "number",
|
||||
"default": 0,
|
||||
"description": "Не начинать ввод раньше этой секунды эмуляции"
|
||||
},
|
||||
"dssTimeout": {
|
||||
"type": "number",
|
||||
"default": 30,
|
||||
"description": "Таймаут появления стабильного prompt DSS"
|
||||
}
|
||||
}
|
||||
},
|
||||
"attach": {
|
||||
"required": ["socket"],
|
||||
"properties": {
|
||||
"socket": {
|
||||
"type": "string",
|
||||
"description": "Unix socket запущенного sdbg_server.py"
|
||||
},
|
||||
"adapterPath": {
|
||||
"type": "string",
|
||||
"description": "Путь к toolchain/sdbg_dap.py; по умолчанию из workspace"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"configurationSnippets": [
|
||||
{
|
||||
"label": "Sprinter MAME: Launch",
|
||||
"description": "Запустить изолированный MAME и остановиться на main",
|
||||
"body": {
|
||||
"type": "sprinter-mame",
|
||||
"request": "launch",
|
||||
"name": "Sprinter MAME: Launch",
|
||||
"build": "^\"${workspaceFolder}/tests/hello/.sprinter-cc-hello\""
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Sprinter MAME: Launch + native debugger",
|
||||
"description": "Запустить VS Code debugger вместе с Cocoa debugger MAME",
|
||||
"body": {
|
||||
"type": "sprinter-mame",
|
||||
"request": "launch",
|
||||
"name": "Sprinter MAME: Launch + native debugger",
|
||||
"build": "^\"${workspaceFolder}/tests/hello/.sprinter-cc-hello\"",
|
||||
"debugger": "osx"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Sprinter MAME: Attach",
|
||||
"description": "Подключиться к проверенной sdbg-сессии",
|
||||
"body": {
|
||||
"type": "sprinter-mame",
|
||||
"request": "attach",
|
||||
"name": "Sprinter MAME: Attach",
|
||||
"socket": "^\"/tmp/sprinter-sdbg.sock\""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"check": "node --check extension.js && node --check build.js && node --test runtime.test.js build.test.js extension.test.js"
|
||||
},
|
||||
"files": ["extension.js", "runtime.js", "build.js", "README.md"],
|
||||
"license": "BSD-3-Clause"
|
||||
}
|
||||
Reference in New Issue
Block a user