Skip to content

Commit 0ca31e9

Browse files
chore(task): fixed shuttle tasks
1 parent 81aeac0 commit 0ca31e9

File tree

2 files changed

+59
-6
lines changed

2 files changed

+59
-6
lines changed

.vscode/launch.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,14 @@
2424
"request": "attach",
2525
"name": "Debug Shuttle",
2626
"program": "${workspaceFolder}/target/debug/api-shuttle",
27-
"preLaunchTask": "shuttle:watch"
27+
"preLaunchTask": "shuttle:run:background"
28+
},
29+
30+
{
31+
"type": "lldb",
32+
"request": "attach",
33+
"name": "Attach to Shuttle",
34+
"program": "${workspaceFolder}/target/debug/api-shuttle"
2835
}
2936
]
3037
}

.vscode/tasks.json

Lines changed: 51 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,32 @@
2727
"label": "shuttle:watch",
2828
"command": "watch",
2929
"problemMatcher": {
30-
"base": "$rustc",
30+
"owner": "rust",
31+
"fileLocation": ["relative", "${workspaceRoot}"],
32+
"pattern": {
33+
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
34+
"file": 1,
35+
"line": 2,
36+
"column": 3,
37+
"severity": 4,
38+
"message": 5
39+
},
3140
"background": {
32-
"activeOnStart": false,
41+
"activeOnStart": true,
3342
"beginsPattern": {
3443
"regexp": "^.*Building.*"
3544
},
3645
"endsPattern": {
37-
"regexp": "^.*Finished running.*"
46+
"regexp": "^.*Starting api-shuttle.*"
3847
}
3948
}
4049
},
4150
"args": ["-x", "shuttle run"],
4251
"isBackground": true,
4352
"options": {
4453
"env": {
45-
"RUST_LOG": "info",
46-
"PORT": "8080"
54+
"RUST_LOG": "info"
55+
// "PORT": "8080"
4756
}
4857
},
4958
"group": {
@@ -67,6 +76,43 @@
6776
"kind": "build",
6877
"isDefault": false
6978
}
79+
},
80+
{
81+
"type": "cargo",
82+
"label": "shuttle:run:background",
83+
"command": "shuttle",
84+
"problemMatcher": {
85+
"owner": "rust",
86+
"fileLocation": ["relative", "${workspaceRoot}"],
87+
"pattern": {
88+
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
89+
"file": 1,
90+
"line": 2,
91+
"column": 3,
92+
"severity": 4,
93+
"message": 5
94+
},
95+
"background": {
96+
"activeOnStart": true,
97+
"beginsPattern": {
98+
"regexp": "^.*Building.*"
99+
},
100+
"endsPattern": {
101+
"regexp": "^.*Starting api-shuttle.*"
102+
}
103+
}
104+
},
105+
"args": ["run"],
106+
"isBackground": true,
107+
"options": {
108+
"env": {
109+
"RUST_LOG": "info"
110+
}
111+
},
112+
"group": {
113+
"kind": "build",
114+
"isDefault": false
115+
}
70116
}
71117
]
72118
}

0 commit comments

Comments
 (0)