debugging and vscode stuffs

master
Mike 5 years ago
parent 5589130bfd
commit f7e2c263ba

@ -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",
}
]
}

@ -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
if (i == 0) {
exe.name = "ecs";
exe.setOutputDir("zig-cache/bin");
const run_exe_step = b.step("run", b.fmt("run {}.zig", .{name}));
run_exe_step.dependOn(&run_cmd.step);
}

Loading…
Cancel
Save