From: Cheng Zhao Date: Wed, 19 Feb 2014 11:07:52 +0000 (+0800) Subject: Enable convient stack printing. X-Git-Tag: v0.10.0~7 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=4a000a35c47105d0485d48b513fa987fa874eb02;p=electron.git Enable convient stack printing. --- diff --git a/app/atom_main_delegate.cc b/app/atom_main_delegate.cc index d8f0c693..af5d4b60 100644 --- a/app/atom_main_delegate.cc +++ b/app/atom_main_delegate.cc @@ -5,6 +5,7 @@ #include "app/atom_main_delegate.h" #include "base/command_line.h" +#include "base/debug/stack_trace.h" #include "base/logging.h" #include "browser/atom_browser_client.h" #include "content/public/common/content_switches.h" @@ -40,6 +41,11 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) { // Logging with pid and timestamp. logging::SetLogItems(true, false, true, false); + // Enable convient stack printing. +#if defined(DEBUG) + base::debug::EnableInProcessStackDumping(); +#endif + return brightray::MainDelegate::BasicStartupComplete(exit_code); }