MCPcopy Create free account
hub / github.com/Kitware/CMake / StartDebuggerIfEnabled

Method StartDebuggerIfEnabled

Source/cmake.cxx:2912–2939  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2910#ifdef CMake_ENABLE_DEBUGGER
2911
2912bool cmake::StartDebuggerIfEnabled()
2913{
2914 if (!this->GetDebuggerOn()) {
2915 return true;
2916 }
2917
2918 if (!DebugAdapter) {
2919 if (this->GetDebuggerPipe().empty()) {
2920 std::cerr
2921 << "Error: --debugger-pipe must be set when debugging is enabled.\n";
2922 return false;
2923 }
2924
2925 try {
2926 DebugAdapter = std::make_shared<cmDebugger::cmDebuggerAdapter>(
2927 std::make_shared<cmDebugger::cmDebuggerPipeConnection>(
2928 this->GetDebuggerPipe()),
2929 this->GetDebuggerDapLogFile());
2930 } catch (std::runtime_error const& error) {
2931 std::cerr << "Error: Failed to create debugger adapter.\n";
2932 std::cerr << error.what() << "\n";
2933 return false;
2934 }
2935 Messenger->SetDebuggerAdapter(DebugAdapter);
2936 }
2937
2938 return true;
2939}
2940
2941void cmake::StopDebuggerIfNeeded(int exitCode)
2942{

Callers 2

SetCacheArgsMethod · 0.95
RunMethod · 0.95

Calls 6

GetDebuggerOnMethod · 0.95
GetDebuggerPipeMethod · 0.95
GetDebuggerDapLogFileMethod · 0.95
SetDebuggerAdapterMethod · 0.80
emptyMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected