Files
EVEngine/tools/vscode-eve-debug/package.json
T
西风逍遥游andCursor 6be64c3d9d feat(devtools): add EveScript LSP and name debugger call stacks
Move the language server into devtools, wire the VS Code extension, and show anonymous closures (eve_update = function) by frame prototype instead of a shifted CallGraph zip.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-03 00:58:22 +08:00

349 lines
9.8 KiB
JSON

{
"name": "eve-debug",
"displayName": "EVEngine EveScript",
"description": "EveScript language support and debugger for EVEngine (LSP + DAP)",
"version": "0.3.0",
"publisher": "evengine",
"repository": "https://github.com/EVEngine/EVEngine",
"engines": {
"vscode": "^1.74.0"
},
"categories": [
"Programming Languages",
"Debuggers",
"Formatters"
],
"activationEvents": [
"onDebugResolve:eve",
"onDebugDynamicConfigurations:eve"
],
"main": "./extension.js",
"scripts": {
"test": "node test/extension.test.js",
"package": "vsce package --no-dependencies"
},
"devDependencies": {
"@vscode/vsce": "^3.6.0"
},
"contributes": {
"configuration": {
"title": "EVEngine",
"properties": {
"eve.executable": {
"type": "string",
"default": "eve",
"description": "Path to the eve executable. Empty or `eve` auto-detects common build/ trees."
},
"eve.languageServer.enabled": {
"type": "boolean",
"default": true,
"description": "Start `eve language-server` for EveScript (.nut) files."
},
"eve.languageServer.trace": {
"type": "string",
"enum": [
"off",
"messages"
],
"default": "off",
"description": "Log LSP JSON-RPC frames to the EVEngine Language Server output channel."
}
}
},
"configurationDefaults": {
"[nut]": {
"editor.tabSize": 4,
"editor.insertSpaces": true,
"editor.semanticHighlighting.enabled": true
}
},
"commands": [
{
"command": "eve-debug.start",
"title": "EVEngine: Start Debug Session",
"category": "EVEngine",
"enablement": "!inDebugMode"
},
{
"command": "eve-debug.debugEditorContents",
"title": "Debug Game Folder",
"category": "EVEngine",
"enablement": "!inDebugMode",
"icon": "$(debug-alt)"
},
{
"command": "eve-debug.continue",
"title": "Continue",
"category": "EVEngine",
"enablement": "debugType == 'eve' && debugState == 'stopped'"
},
{
"command": "eve-debug.stepOver",
"title": "Step Over",
"category": "EVEngine",
"enablement": "debugType == 'eve' && debugState == 'stopped'"
},
{
"command": "eve-debug.stepInto",
"title": "Step Into",
"category": "EVEngine",
"enablement": "debugType == 'eve' && debugState == 'stopped'"
},
{
"command": "eve-debug.stepOut",
"title": "Step Out",
"category": "EVEngine",
"enablement": "debugType == 'eve' && debugState == 'stopped'"
},
{
"command": "eve-debug.stepFrame",
"title": "Step Frame",
"category": "EVEngine",
"enablement": "debugType == 'eve' && debugState == 'stopped'"
},
{
"command": "eve-debug.pause",
"title": "Pause",
"category": "EVEngine",
"enablement": "debugType == 'eve' && debugState == 'running'"
},
{
"command": "eve-debug.inspectVariable",
"title": "查看实例 (Inspect Instance)",
"category": "EVEngine",
"enablement": "debugType == 'eve' && debugState == 'stopped'"
},
{
"command": "eve-debug.showErrorSlice",
"title": "Show Error Slice",
"category": "EVEngine",
"enablement": "debugType == 'eve'"
}
],
"menus": {
"debug/variables/context": [
{
"command": "eve-debug.inspectVariable",
"when": "debugType == 'eve' && __vscodeVariableMenuContext == 'object'",
"group": "navigation@1"
}
],
"editor/title/run": [
{
"command": "eve-debug.debugEditorContents",
"when": "resourceLangId == nut || resourceExtname == .nut",
"group": "navigation@1"
}
],
"commandPalette": [
{
"command": "eve-debug.debugEditorContents",
"when": "resourceLangId == nut || resourceExtname == .nut"
},
{
"command": "eve-debug.continue",
"when": "debugType == 'eve'"
},
{
"command": "eve-debug.stepOver",
"when": "debugType == 'eve'"
},
{
"command": "eve-debug.stepInto",
"when": "debugType == 'eve'"
},
{
"command": "eve-debug.stepOut",
"when": "debugType == 'eve'"
},
{
"command": "eve-debug.stepFrame",
"when": "debugType == 'eve'"
},
{
"command": "eve-debug.showErrorSlice",
"when": "debugType == 'eve'"
}
]
},
"keybindings": [
{
"command": "eve-debug.continue",
"key": "f5",
"when": "debugType == 'eve' && debugState == 'stopped'"
},
{
"command": "eve-debug.stepFrame",
"key": "f8",
"when": "debugType == 'eve' && debugState == 'stopped'"
},
{
"command": "eve-debug.pause",
"key": "f6",
"when": "debugType == 'eve' && debugState == 'running'"
}
],
"breakpoints": [
{
"language": "squirrel"
},
{
"language": "nut"
}
],
"languages": [
{
"id": "nut",
"aliases": [
"EveScript",
"Squirrel",
"nut"
],
"extensions": [
".nut"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "nut",
"scopeName": "source.evescript",
"path": "./syntaxes/evescript.tmLanguage.json"
}
],
"semanticTokenScopes": [
{
"language": "nut",
"scopes": {
"namespace": ["entity.name.namespace.evescript"],
"class": ["entity.name.type.class.evescript"],
"function": ["entity.name.function.evescript"],
"method": ["entity.name.function.member.evescript"],
"variable": ["variable.other.readwrite.evescript"],
"property": ["variable.other.property.evescript"],
"keyword": ["constant.language.boolean.evescript"]
}
}
],
"debuggers": [
{
"type": "eve",
"label": "EVEngine",
"languages": [
"nut",
"squirrel"
],
"configurationAttributes": {
"launch": {
"required": [
"program"
],
"properties": {
"program": {
"type": "string",
"description": "Game directory passed to `eve run` (cwd + mount root).",
"default": "${workspaceFolder}"
},
"evePath": {
"type": "string",
"description": "Path to the eve executable. Empty/`eve` auto-detects common build/ trees.",
"default": "eve"
},
"cwd": {
"type": "string",
"description": "Working directory for the eve process (defaults to program).",
"default": "${workspaceFolder}"
},
"port": {
"type": "number",
"description": "DAP TCP port. 0 = pick a free port.",
"default": 0
},
"host": {
"type": "string",
"description": "DAP host",
"default": "127.0.0.1"
},
"args": {
"type": "array",
"description": "Extra arguments after `eve run --debug --dap-port .`",
"default": [],
"items": {
"type": "string"
}
},
"trace": {
"type": "boolean",
"description": "Log DAP messages to the EVEngine Debug output channel.",
"default": false
},
"stopOnEntry": {
"type": "boolean",
"description": "Pause before the first eve_update (engine Pause).",
"default": false
}
}
},
"attach": {
"required": [
"port"
],
"properties": {
"port": {
"type": "number",
"description": "DAP TCP port of a running `eve run --dap-port`",
"default": 4711
},
"host": {
"type": "string",
"default": "127.0.0.1"
},
"trace": {
"type": "boolean",
"description": "Log DAP messages to the EVEngine Debug output channel.",
"default": false
}
}
}
},
"initialConfigurations": [
{
"type": "eve",
"request": "launch",
"name": "EVEngine: Debug game",
"program": "${workspaceFolder}",
"evePath": "eve",
"port": 0
}
],
"configurationSnippets": [
{
"label": "EVEngine: Launch",
"description": "Launch eve with DAP debugging (F5 continue, F10/F11 step)",
"body": {
"type": "eve",
"request": "launch",
"name": "EVEngine: Debug game",
"program": "^\"\\${workspaceFolder}\"",
"evePath": "eve",
"port": 0
}
},
{
"label": "EVEngine: Attach",
"description": "Attach to eve run --dap-port",
"body": {
"type": "eve",
"request": "attach",
"name": "EVEngine: Attach",
"host": "127.0.0.1",
"port": 4711
}
}
]
}
]
}
}