Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / base / debug / debugger_win.cc
blobccc9c1604bc3dca339aee501bf6124f1ee7123c6
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/debug/debugger.h"
7 #include <stdlib.h>
8 #include <windows.h>
10 namespace base {
11 namespace debug {
13 bool BeingDebugged() {
14 return ::IsDebuggerPresent() != 0;
17 void BreakDebugger() {
18 if (IsDebugUISuppressed())
19 _exit(1);
20 __debugbreak();
21 #if defined(NDEBUG)
22 _exit(1);
23 #endif
26 } // namespace debug
27 } // namespace base