From 50cef816cf7230e3165f552f08d673835a1c6173 Mon Sep 17 00:00:00 2001 From: Jose Celano Date: Fri, 15 Sep 2023 15:52:35 +0100 Subject: [PATCH] chore: update config for debuggin in Visual Studio Code --- .vscode/launch.json | 213 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 186 insertions(+), 27 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index f6f4ed4c..4f1a4c0b 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,35 +1,194 @@ { + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'torrust-index-backend'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=torrust-index-backend" + ], + "filter": { + "name": "torrust-index-backend", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug executable 'main'", + "cargo": { + "args": [ + "build", + "--bin=main", + "--package=torrust-index-backend" + ], + "filter": { + "name": "main", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in executable 'main'", + "cargo": { + "args": [ + "test", + "--no-run", + "--bin=main", + "--package=torrust-index-backend" + ], + "filter": { + "name": "main", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug executable 'import_tracker_statistics'", + "cargo": { + "args": [ + "build", + "--bin=import_tracker_statistics", + "--package=torrust-index-backend" + ], + "filter": { + "name": "import_tracker_statistics", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in executable 'import_tracker_statistics'", + "cargo": { + "args": [ + "test", + "--no-run", + "--bin=import_tracker_statistics", + "--package=torrust-index-backend" + ], + "filter": { + "name": "import_tracker_statistics", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", "name": "Debug executable 'parse_torrent'", - "type": "cppdbg", - "request": "launch", - "program": "${workspaceFolder}/target/debug/parse_torrent", - "args": ["./tests/fixtures/torrents/MC_GRID.zip-3cd18ff2d3eec881207dcc5ca5a2c3a2a3afe462.torrent"], - "stopAtEntry": false, - "cwd": "${workspaceFolder}", - "environment": [], - "externalConsole": false, - "MIMode": "gdb", - "setupCommands": [ - { - "description": "Enable pretty-printing for gdb", - "text": "-enable-pretty-printing", - "ignoreFailures": true - } - ], - "preLaunchTask": "cargo build", - "miDebuggerPath": "/usr/bin/gdb", - "linux": { - "miDebuggerPath": "/usr/bin/gdb" - }, - "windows": { - "miDebuggerPath": "C:\\MinGW\\bin\\gdb.exe" - }, - "osx": { - "miDebuggerPath": "/usr/local/bin/gdb" - } + "cargo": { + "args": [ + "build", + "--bin=parse_torrent", + "--package=torrust-index-backend" + ], + "filter": { + "name": "parse_torrent", + "kind": "bin" + } + }, + "args": ["./tests/fixtures/torrents/not-working-with-two-nodes.torrent"], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in executable 'parse_torrent'", + "cargo": { + "args": [ + "test", + "--no-run", + "--bin=parse_torrent", + "--package=torrust-index-backend" + ], + "filter": { + "name": "parse_torrent", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug executable 'upgrade'", + "cargo": { + "args": [ + "build", + "--bin=upgrade", + "--package=torrust-index-backend" + ], + "filter": { + "name": "upgrade", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in executable 'upgrade'", + "cargo": { + "args": [ + "test", + "--no-run", + "--bin=upgrade", + "--package=torrust-index-backend" + ], + "filter": { + "name": "upgrade", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug integration test 'mod'", + "cargo": { + "args": [ + "test", + "--no-run", + "--test=mod", + "--package=torrust-index-backend" + ], + "filter": { + "name": "mod", + "kind": "test" + } + }, + "args": [], + "cwd": "${workspaceFolder}" } ] } \ No newline at end of file