Do I need any special configuration on CLion to enable breakpoint debugging in macOS?

Sting Ko <[email protected]>
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <[email protected]>
I tried using the following CMake configuration with Ninja for debugging in 
CLion, but breakpoints are not being hit. CLion displays the message “The 
breakpoint will not currently be hit. No executable code associated with 
this line.” This happens even for breakpoints in the OnInit function of 
main, although the program runs normally.

I intentionally created some internal errors, and the error messages can be 
debugged normally.
cmake_minimum_required(VERSION 3.15) set(CMAKE_MODULE_PATH 
"${PROJECT_SOURCE_DIR}") if (APPLE) set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" 
CACHE STRING "CMAKE_OSX_DEPLOYMENT_TARGET" FORCE) 
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING 
"CMAKE_OSX_ARCHITECTURES" FORCE) set(CMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH 
OFF CACHE STRING "CMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH" FORCE) 
set(wxUSE_SYS_LIBS OFF CACHE BOOL "wxUSE_SYS_LIBS" FORCE) endif () 
set(wxWidgets_USE_STATIC ON CACHE BOOL "Use wxWidgets as static libraries" 
FORCE) set(wxBUILD_SHARED OFF CACHE BOOL "Build wxWidgets as static 
libraries" FORCE) set(wxBUILD_SAMPLES OFF CACHE BOOL "Build wxWidgets 
samples" FORCE) if (APPLE) project(Test VERSION 1.0 LANGUAGES CXX OBJCXX) 
else () project(Test VERSION 1.0 LANGUAGES CXX) endif () 
add_executable(Test main.cpp main.hpp MainFrame.cpp MainFrame.hpp ) 
find_package(wxWidgets REQUIRED COMPONENTS core base) 
if(wxWidgets_USE_FILE) # not defined in CONFIG mode 
include(${wxWidgets_USE_FILE}) endif() add_executable(Test myapp.cpp) 
target_link_libraries(Test ${wxWidgets_LIBRARIES}) if (APPLE) 
find_library(COCOA_LIBRARY Cocoa) include_directories(${COCOA_LIBRARY}) 
link_libraries(${COCOA_LIBRARY}) target_link_libraries(Test PRIVATE 
${COCOA_LIBRARY}) set_target_properties(Test PROPERTIES COMPILE_FLAGS "-x 
objective-c++" ) set_target_properties(Test PROPERTIES MACOSX_BUNDLE TRUE 
MACOSX_BUNDLE_GUI_IDENTIFIER "com.wxwidgets.test" MACOSX_BUNDLE_BUNDLE_NAME 
"Test" MACOSX_BUNDLE_SHORT_VERSION_STRING "${PROJECT_VERSION}" 
MACOSX_BUNDLE_LONG_VERSION_STRING "${PROJECT_VERSION}" 
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_BINARY_DIR}/Info.plist" 
MACOSX_BUNDLE_ICON_FILE "Test.icns" ) endif ()

-- 
Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
--- 
You received this message because you are subscribed to the Google Groups "wx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/wx-users/0ce81a10-8a3c-416e-9d39-9224ba71d3a7n%40googlegroups.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.