1. CMakeLists.txt 需要设置为 Debug 模式
示例
cmake_minimum_required(VERSION 2.8)
Project (Eigen_test)
include_directories("/usr/include/eigen3")
# Debug mode
SET(CMAKE_BUILD_TYPE "Debug")
# Release mode
# SET(CMAKE_BUILD_TYPE "Debug")
# Or just do not set CMAKE_BUILD_TYPE
add_executable(Eigen_test test_eigen.cpp)
2. 在Kdevelop中
Run -> Configure Launches... 设置一下(一般默认就可以,由于我之前配置的是python ,所以新建了一个Configuration)
在代码中建立断点;
ctrl + alt + B (或者鼠标)
运行 F9 (或者鼠标操作)
单步 F10
跳入 F11
跳出 F12