oneapi-src / oneapi-src/oneAPI-samples
`gdb-oneapi` debug breakpoint doesn't work at all in VSCode
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C++
- Star
- 1.2k
- Fork
- 745
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Summary
I can set breakpoints in VSCode. I can see the red dots. However, once I start debugging, the red dots move to other lines. Trying to set breakpoints during debugging is like catching the air! It just either doesn't stick at all or moves to other lines. I am using CMake and this is at the top of my CMakeLists.txt:
cmake_minimum_required(VERSION 3.30.3 FATAL_ERROR)
project(DataStructuresAlgorithms CXX)
set(CMAKE_CXX_STANDARD 26)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_BUILD_TYPE "Debug")
# ###############################################################################
# Global compiler options
# https://stackoverflow.com/questions/79444534/vscode-cmake-configure-does-not-generate-cmakecache-txt-from-cmakelists-txt
# CMAKE_CXX_COMPILER_ID is set only at the project() call, when CMake actually detect compilers.
# ###############################################################################
if(MSVC)
# remove default flags provided with CMake for MSVC
set(CMAKE_CXX_FLAGS "")
set(CMAKE_CXX_FLAGS_DEBUG "")
set(CMAKE_CXX_FLAGS_RELEASE "")
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
message("-- Setting GNU options from CMakeLists.txt")
set(CMAKE_CXX_FLAGS "-std=gnu++26 -fdiagnostics-color=always" CACHE STRING "CXX build flags" FORCE)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -ggdb3 -Og -g3" CACHE STRING "Debug build flags" FORCE)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -O3 -DNDEBUG" CACHE STRING "Release build flags" FORCE)
endif()
Version
Report oneAPI Toolkit version and oneAPI Sample version or hash.
$ gdb-oneapi --version
GNU gdb (Intel(R) Distribution for GDB* 2025.3.0) 16.3
Copyright (C) 2025 Free Software Foundation, Inc.; (C) 2025 Intel Corp.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Environment
Ubuntu 25.10
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện hành vi của breakpoint trong VSCode với gdb-oneapi 16.3 trên Ubuntu 25.10, sử dụng cấu hình CMakeLists.txt được nêu trong báo cáo. So sánh các breakpoint được đặt trước và trong khi debug, đồng thời xác minh rằng chúng vẫn nằm trên các dòng mã nguồn dự định. Công việc được coi là hoàn thành khi đã xác định được nguyên nhân và đã ghi lại hoặc xác thực một bản sửa lỗi cho việc breakpoint bị di chuyển và không hoạt động.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- cmake, cpp, vscode
- Lĩnh vực
- build-system, devtools
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 35/100