From 5c3e3f692ee14d120107029c0cf4ae8d2d65dae6 Mon Sep 17 00:00:00 2001 From: "l.feng" <43399351+msclock@users.noreply.github.com> Date: Sat, 21 Dec 2024 20:53:26 +0800 Subject: [PATCH] perf: refine vscode development configuration (#80) - Debug in the target folder - Avoid annoying cmake automatic configuration - Show CMake toolset with icons in status bar - Configure pytest args Signed-off-by: l.feng <43399351+msclock@users.noreply.github.com> --- .vscode/launch.json | 2 +- .vscode/settings.json | 11 +++++++++-- template/.vscode/launch.json.jinja | 2 +- template/.vscode/settings.json | 11 +++++++++-- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index bad5311..4abfecb 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -11,7 +11,7 @@ "program": "${command:cmake.launchTargetPath}", "args": [], "stopAtEntry": false, - "cwd": "${fileDirname}", + "cwd": "${command:cmake.launchTargetDirectory}", "environment": [], "externalConsole": false, "MIMode": "gdb", diff --git a/.vscode/settings.json b/.vscode/settings.json index b600a1c..f8b1473 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,9 +1,16 @@ { - "python.testing.pytestArgs": ["tests"], + "python.testing.pytestArgs": [ + "tests", + "-ra", + "--showlocals", + "--strict-markers", + "--strict-config" + ], "python.testing.unittestEnabled": false, "python.testing.pytestEnabled": true, + "cmake.configureOnEdit": false, + "cmake.options.statusBarVisibility": "icon", "cmake.useCMakePresets": "always", - "cmake.options.statusBarVisibility": "compact", "files.associations": { "iosfwd": "cpp", "type_traits": "cpp", diff --git a/template/.vscode/launch.json.jinja b/template/.vscode/launch.json.jinja index bad5311..4abfecb 100644 --- a/template/.vscode/launch.json.jinja +++ b/template/.vscode/launch.json.jinja @@ -11,7 +11,7 @@ "program": "${command:cmake.launchTargetPath}", "args": [], "stopAtEntry": false, - "cwd": "${fileDirname}", + "cwd": "${command:cmake.launchTargetDirectory}", "environment": [], "externalConsole": false, "MIMode": "gdb", diff --git a/template/.vscode/settings.json b/template/.vscode/settings.json index b600a1c..f8b1473 100644 --- a/template/.vscode/settings.json +++ b/template/.vscode/settings.json @@ -1,9 +1,16 @@ { - "python.testing.pytestArgs": ["tests"], + "python.testing.pytestArgs": [ + "tests", + "-ra", + "--showlocals", + "--strict-markers", + "--strict-config" + ], "python.testing.unittestEnabled": false, "python.testing.pytestEnabled": true, + "cmake.configureOnEdit": false, + "cmake.options.statusBarVisibility": "icon", "cmake.useCMakePresets": "always", - "cmake.options.statusBarVisibility": "compact", "files.associations": { "iosfwd": "cpp", "type_traits": "cpp",