debugging and vscode stuffs
This commit is contained in:
parent
5589130bfd
commit
f7e2c263ba
13
zig-ecs/.vscode/launch.json
vendored
Normal file
13
zig-ecs/.vscode/launch.json
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "lldb Debug ecs binary",
|
||||||
|
"type": "lldb",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/zig-cache/bin/ecs",
|
||||||
|
"args": [],
|
||||||
|
"preLaunchTask": "Build Project",
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
72
zig-ecs/.vscode/tasks.json
vendored
Normal file
72
zig-ecs/.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
{
|
||||||
|
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||||
|
// for the documentation about the tasks.json format
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"label": "Build Project",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "zig build",
|
||||||
|
"problemMatcher": [
|
||||||
|
"$gcc"
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Build and Run Project",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "zig build run",
|
||||||
|
"problemMatcher": [
|
||||||
|
"$gcc"
|
||||||
|
],
|
||||||
|
"group": {
|
||||||
|
"kind": "build",
|
||||||
|
"isDefault": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Test Project",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "zig build test",
|
||||||
|
"problemMatcher": [
|
||||||
|
"$gcc"
|
||||||
|
],
|
||||||
|
"group": {
|
||||||
|
"kind": "build",
|
||||||
|
"isDefault": true
|
||||||
|
},
|
||||||
|
"presentation": {
|
||||||
|
"clear": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Build and Run Current File",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "zig run ${file}",
|
||||||
|
"problemMatcher": [
|
||||||
|
"$gcc"
|
||||||
|
],
|
||||||
|
"presentation": {
|
||||||
|
"clear": true
|
||||||
|
},
|
||||||
|
"group": {
|
||||||
|
"kind": "build",
|
||||||
|
"isDefault": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Build and Run Tests in Current File",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "zig test ${file}",
|
||||||
|
"problemMatcher": [
|
||||||
|
"$gcc"
|
||||||
|
],
|
||||||
|
"presentation": {
|
||||||
|
"clear": true
|
||||||
|
},
|
||||||
|
"group": {
|
||||||
|
"kind": "build",
|
||||||
|
"isDefault": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
@ -23,6 +23,8 @@ pub fn build(b: *Builder) void {
|
|||||||
|
|
||||||
// first element in the list is added as "run" so "zig build run" works
|
// first element in the list is added as "run" so "zig build run" works
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
|
exe.name = "ecs";
|
||||||
|
exe.setOutputDir("zig-cache/bin");
|
||||||
const run_exe_step = b.step("run", b.fmt("run {}.zig", .{name}));
|
const run_exe_step = b.step("run", b.fmt("run {}.zig", .{name}));
|
||||||
run_exe_step.dependOn(&run_cmd.step);
|
run_exe_step.dependOn(&run_cmd.step);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user