|
7 | 7 | { |
8 | 8 | "type": "lldb", |
9 | 9 | "request": "launch", |
10 | | - "name": "Debug unit tests in executable 'advent_of_code'", |
| 10 | + "name": "Debug unit tests for a solution", |
11 | 11 | "cargo": { |
12 | | - "args": ["test", "--no-run", "--bin=advent_of_code", "--package=advent_of_code"], |
13 | | - "filter": { |
14 | | - "name": "advent_of_code", |
15 | | - "kind": "bin" |
16 | | - } |
| 12 | + "args": [ |
| 13 | + "test", |
| 14 | + "--no-run", |
| 15 | + // replace `01` here with the solution you like to debug. |
| 16 | + "--bin=01", |
| 17 | + "--package=advent_of_code" |
| 18 | + ], |
17 | 19 | }, |
18 | 20 | "args": [], |
19 | 21 | "cwd": "${workspaceFolder}" |
20 | 22 | }, |
21 | 23 | { |
22 | 24 | "type": "lldb", |
23 | 25 | "request": "launch", |
24 | | - "name": "Debug executable 'advent_of_code'", |
| 26 | + "name": "Debug a solution", |
25 | 27 | "cargo": { |
26 | | - "args": ["build", "--bin=advent_of_code", "--package=advent_of_code"], |
27 | | - "filter": { |
28 | | - "name": "advent_of_code", |
29 | | - "kind": "bin" |
30 | | - } |
| 28 | + "args": [ |
| 29 | + "build", |
| 30 | + // replace `01` here with the solution you like to debug. |
| 31 | + "--bin=01", |
| 32 | + "--package=advent_of_code" |
| 33 | + ], |
31 | 34 | }, |
32 | | - "args": ["1"], |
33 | 35 | "cwd": "${workspaceFolder}" |
34 | 36 | }, |
35 | 37 | { |
36 | 38 | "type": "lldb", |
37 | 39 | "request": "launch", |
38 | 40 | "name": "Debug unit tests in library 'advent_of_code'", |
39 | 41 | "cargo": { |
40 | | - "args": ["test", "--no-run", "--lib", "--package=advent_of_code"], |
| 42 | + "args": [ |
| 43 | + "test", |
| 44 | + "--no-run", |
| 45 | + "--lib", |
| 46 | + "--features=test_lib", |
| 47 | + "--package=advent_of_code" |
| 48 | + ], |
41 | 49 | "filter": { |
42 | 50 | "name": "advent_of_code", |
43 | 51 | "kind": "lib" |
|
0 commit comments