From 84208a663a6185fc037eda35669d3aa859e508a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sp=C3=B6ttel?= <1682504+fspoettel@users.noreply.github.com> Date: Sun, 10 Dec 2023 23:52:27 +0100 Subject: [PATCH] fix: fix vscode launch configs --- .vscode/launch.json | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 0a9370e..8f244cf 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -7,13 +7,15 @@ { "type": "lldb", "request": "launch", - "name": "Debug unit tests in executable 'advent_of_code'", + "name": "Debug unit tests for a solution", "cargo": { - "args": ["test", "--no-run", "--bin=advent_of_code", "--package=advent_of_code"], - "filter": { - "name": "advent_of_code", - "kind": "bin" - } + "args": [ + "test", + "--no-run", + // replace `01` here with the solution you like to debug. + "--bin=01", + "--package=advent_of_code" + ], }, "args": [], "cwd": "${workspaceFolder}" @@ -21,15 +23,15 @@ { "type": "lldb", "request": "launch", - "name": "Debug executable 'advent_of_code'", + "name": "Debug a solution", "cargo": { - "args": ["build", "--bin=advent_of_code", "--package=advent_of_code"], - "filter": { - "name": "advent_of_code", - "kind": "bin" - } + "args": [ + "build", + // replace `01` here with the solution you like to debug. + "--bin=01", + "--package=advent_of_code" + ], }, - "args": ["1"], "cwd": "${workspaceFolder}" }, { @@ -37,7 +39,13 @@ "request": "launch", "name": "Debug unit tests in library 'advent_of_code'", "cargo": { - "args": ["test", "--no-run", "--lib", "--package=advent_of_code"], + "args": [ + "test", + "--no-run", + "--lib", + "--features=test_lib", + "--package=advent_of_code" + ], "filter": { "name": "advent_of_code", "kind": "lib"