]> khamidou — GitHub mirrors - electron.git/commitdiff
Enable convient stack printing.
authorCheng Zhao <zcbenz@gmail.com>
Wed, 19 Feb 2014 11:07:52 +0000 (19:07 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 19 Feb 2014 11:07:52 +0000 (19:07 +0800)
app/atom_main_delegate.cc

index d8f0c693d494e672326a1d8f0c64961093c124f9..af5d4b607957a45b6d316c0118e8bce5d57d7829 100644 (file)
@@ -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);
 }