Skip to content

Commit

Permalink
devcontainer: Add debug target for gtest
Browse files Browse the repository at this point in the history
  • Loading branch information
marcojob committed Nov 11, 2024
1 parent 0fea30d commit 9657926
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"customizations": {
"vscode": {
"extensions": [
"ms-python.python"
"ms-vscode.cpptools"
],
"settings": {
"files.hotExit": "off",
Expand Down
1 change: 1 addition & 0 deletions .devcontainer/devcontainer_all_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ main() {
ccache
cmake
curl
gdb
gfortran
git
gnupg
Expand Down
26 changes: 26 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
// 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": [
{
"name": "Debug test_depth_anything_v2",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/devel/lib/usb_cam/test_depth_anything_v2",
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb", // Use gdb for debugging
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"miDebuggerPath": "/usr/bin/gdb"
}
]
}
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ target_include_directories(${PROJECT_NAME}_node PUBLIC
# Testing
if(BUILD_TESTING)
# Find GTest package
set(CMAKE_BUILD_TYPE Debug)
find_package(GTest REQUIRED)
include_directories(${GTEST_INCLUDE_DIRS})

Expand Down
2 changes: 1 addition & 1 deletion include/usb_cam/learning/depth_anything_v2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ class DepthAnythingV2 : public LearningInterface {
cv::Size _INPUT_SIZE;
};

#endif // DEPTH_ANYTHING_HPP_
#endif // DEPTH_ANYTHING_HPP_
2 changes: 1 addition & 1 deletion src/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@ LearningInterface::~LearningInterface() {

delete[] _input_data;
delete[] _output_data;
}
}

0 comments on commit 9657926

Please sign in to comment.