Add the ability to run the luprex server from vscode

This commit is contained in:
2025-06-27 15:11:54 -04:00
parent 30757a88c5
commit 8298ef6e72
2 changed files with 47 additions and 23 deletions

View File

@@ -84,30 +84,47 @@
"launch": { "launch": {
"version": "0.2.0", "version": "0.2.0",
"configurations": { "configurations": {
"for-each": [ "append1" : {
{ "SERVER" : "Standalone" }, "for-each": [
{ "SERVER" : "LocalHost" }, { "SERVER" : "Standalone" },
{ "SERVER" : "192.168.1.155" }, { "SERVER" : "LocalHost" },
{ "SERVER" : "192.168.1.156" } { "SERVER" : "192.168.1.155" },
], { "SERVER" : "192.168.1.156" }
"body": {
"name": "Server=[SERVER]",
"request": "launch",
"program": "[UNREALENGINE]/Engine/Binaries/Linux/UnrealEditor-Linux-DebugGame",
"preLaunchTask": "python3 build.py c++",
"args": [
"[INTEGRATION]/Integration.uproject",
"-userdir=User/[USER]",
"-LuprexServer=[SERVER]"
], ],
"cwd": "[INTEGRATION]", "body": {
"type": "lldb", "name": "Server=[SERVER]",
"initCommands": [ "request": "launch",
"command script import [UNREALENGINE]/Engine/Extras/LLDBDataFormatters/UEDataFormatters_2ByteChars.py", "program": "[UNREALENGINE]/Engine/Binaries/Linux/UnrealEditor-Linux-DebugGame",
"settings set target.inline-breakpoint-strategy always", "preLaunchTask": "python3 build.py c++",
"target stop-hook add --one-liner \"p ::UngrabAllInputImpl()\"" "args": [
] "[INTEGRATION]/Integration.uproject",
} "-userdir=User/[USER]",
"-LuprexServer=[SERVER]"
],
"cwd": "[INTEGRATION]",
"type": "lldb",
"initCommands": [
"command script import [UNREALENGINE]/Engine/Extras/LLDBDataFormatters/UEDataFormatters_2ByteChars.py",
"settings set target.inline-breakpoint-strategy always",
"target stop-hook add --one-liner \"p ::UngrabAllInputImpl()\""
]
}
},
"append2" : [
{
"name": "Luprex Server",
"request": "launch",
"program": "[INTEGRATION]/luprex/build/[OS]/luprexstatic",
"preLaunchTask": "python3 build.py c++",
"args": [ "lpxserver" ],
"cwd": "[INTEGRATION]/luprex",
"type": "lldb",
"console": "integratedTerminal",
"initCommands": [
"settings set target.inline-breakpoint-strategy always"
]
}
]
} }
} }
} }

View File

@@ -65,6 +65,13 @@ def expand_json(data, vars):
body = data["body"] body = data["body"]
foreach = data["for-each"] foreach = data["for-each"]
return [ expand_json(body, vars | lvars) for lvars in foreach ] return [ expand_json(body, vars | lvars) for lvars in foreach ]
if "append1" in data and "append2" in data:
result = []
for i in range(1, 1000):
key = f"append{i}"
if key not in data: break
result = result + expand_json(data[key], vars)
return result
else: else:
return { key: expand_json(value, vars) for key, value in data.items() } return { key: expand_json(value, vars) for key, value in data.items() }
elif isinstance(data, list): elif isinstance(data, list):