Add the ability to run the luprex server from vscode
This commit is contained in:
@@ -84,6 +84,7 @@
|
|||||||
"launch": {
|
"launch": {
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": {
|
"configurations": {
|
||||||
|
"append1" : {
|
||||||
"for-each": [
|
"for-each": [
|
||||||
{ "SERVER" : "Standalone" },
|
{ "SERVER" : "Standalone" },
|
||||||
{ "SERVER" : "LocalHost" },
|
{ "SERVER" : "LocalHost" },
|
||||||
@@ -108,6 +109,22 @@
|
|||||||
"target stop-hook add --one-liner \"p ::UngrabAllInputImpl()\""
|
"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"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
7
build.py
7
build.py
@@ -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):
|
||||||
|
|||||||
Reference in New Issue
Block a user