Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::is_debugger_present

      From cppreference.com
      <cpp‎ |utility
       
       
      Diagnostics library
       
      Defined in header<debugging>
      bool is_debugger_present()noexcept;
      (since C++26)

      Attempts to determine if the program is being executed with debugger present.

      This function isreplaceable.

      Contents

      [edit]Return value

      The default version returns an implementation-defined value, which usually represents whether the program is executed under a debugger.

      [edit]Notes

      The intent of this function is allowing printing out extra output to help diagnose problems, executing extra test code, displaying an extra user interface to help in debugging, etc.

      Feature-test macroValueStdFeature
      __cpp_lib_debugging202311L(C++26)Debugging support library
      202403L(C++26)Replaceablestd::is_debugger_present

      [edit]Example

      This section is incomplete
      Reason: no example

      [edit]See also

      (C++26)
      pauses the running program when called
      (function)[edit]
      callsstd::breakpoint ifstd::is_debugger_present returnstrue
      (function)[edit]

      [edit]External links

      is_debugger_present standardizes many similar existing facilities, e.g.:

      1. under_debugger fromboost.test
      2. IsDebuggerPresent() from Win32 API
      3. isDebuggerActive fromCatch2
      4. IsDebuggerPresent fromUnreal Engine
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/utility/is_debugger_present&oldid=181329"

      [8]ページ先頭

      ©2009-2025 Movatter.jp