You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on a project using SDL, I ran into a weird issue where after setting a breakpoint, the VS Code debugger (using lldb) would stop at the breakpoint and show the stack trace, but couldn't load variables or step. The program then also froze, even after stopping the debugger and had to be force quit. I reduced it to the following minimal example:
cmake_minimum_required(VERSION 3.15)
project(LLDB Repro)
# Set the C++ standard to be used for compilationset(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Define the source files to be compiledfile(GLOB_RECURSE SOURCE_FILES
main.cpp
)
# Create an executable from the source filesadd_executable(${PROJECT_NAME}${SOURCE_FILES})
# Find the SDL2 packagefind_package(SDL2 REQUIRED)
# Add the SDL2 include directories and link the SDL2 librariestarget_include_directories(${PROJECT_NAME}PRIVATE${SDL2_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME}${SDL2_LIBRARIES})
If I set a breakpoint in the main function, VS Code will break there, but then something crashes internally. If you remove either the map or SDL_Init, the problem disappears. I also tried debugging manually from the command line with LLDB, but there the issue doesn't appear.
robert@RMBA LLDB Repro % lldb --version
lldb-1403.0.17.64
Apple Swift version 5.8 (swiftlang-5.8.0.124.2 clang-1403.0.22.11.100)
robert@RMBA LLDB Repro % brew list --versions sdl2
sdl2 2.26.5
Extension version: 1.15.4
VS Code version: Code 1.78.2 (Universal) (b3e4e68a0bc097f0ae7907b217c1119af9e03435, 2023-05-10T14:44:45.204Z)
OS version: Darwin arm64 22.4.0
Modes:
Sandboxed: Yes
Type: Bug
While working on a project using SDL, I ran into a weird issue where after setting a breakpoint, the VS Code debugger (using lldb) would stop at the breakpoint and show the stack trace, but couldn't load variables or step. The program then also froze, even after stopping the debugger and had to be force quit. I reduced it to the following minimal example:
main.cpp
CMakeLists.txt
launch.json
c_cpp_properties.json
If I set a breakpoint in the
main
function, VS Code will break there, but then something crashes internally. If you remove either themap
orSDL_Init
, the problem disappears. I also tried debugging manually from the command line with LLDB, but there the issue doesn't appear.Extension version: 1.15.4
VS Code version: Code 1.78.2 (Universal) (b3e4e68a0bc097f0ae7907b217c1119af9e03435, 2023-05-10T14:44:45.204Z)
OS version: Darwin arm64 22.4.0
Modes:
Sandboxed: Yes
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: