Skip to content
Permalink
Browse files
Make the web process break into the debugger when Ctrl-Alt-Shift is h…
…eld during launch

Fixes <http://webkit.org/b/42670> Would like a way to break into the
debugger when the web process launches

Reviewed by Anders Carlsson.

* WebProcess/WebKitMain.cpp:
(WebKitMain): If the Control, Alt, and Shift keys are held down in a
Debug build, call DebugBreak() so that we will break into the
debugger.

Canonical link: https://commits.webkit.org/54615@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@63777 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
aroben committed Jul 20, 2010
1 parent de36c42 commit 3ae4c1d05646a52cda4ee7b873188dc74cba7eba
Showing with 23 additions and 0 deletions.
  1. +15 −0 WebKit2/ChangeLog
  2. +8 −0 WebKit2/WebProcess/WebKitMain.cpp
@@ -1,3 +1,18 @@
2010-07-20 Adam Roben <aroben@apple.com>

Make the web process break into the debugger when Ctrl-Alt-Shift is
held during launch

Fixes <http://webkit.org/b/42670> Would like a way to break into the
debugger when the web process launches

Reviewed by Anders Carlsson.

* WebProcess/WebKitMain.cpp:
(WebKitMain): If the Control, Alt, and Shift keys are held down in a
Debug build, call DebugBreak() so that we will break into the
debugger.

2010-07-20 Adam Roben <aroben@apple.com>

Teach Connection how to handle a slow receiver
@@ -77,6 +77,14 @@ static void enableTerminationOnHeapCorruption()
extern "C" __declspec(dllexport)
int WebKitMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpstrCmdLine, int nCmdShow)
{
#ifndef NDEBUG
// Break into the debugger when Ctrl-Alt-Shift is held down during launch. This makes it easier
// to debug problems that happen early in the web process's liftime.
const unsigned short highBitMaskShort = 0x8000;
if ((::GetKeyState(VK_CONTROL) & highBitMaskShort) && (::GetKeyState(VK_MENU) & highBitMaskShort) && (::GetKeyState(VK_SHIFT) & highBitMaskShort))
::DebugBreak();
#endif

enableTerminationOnHeapCorruption();

CommandLine commandLine;

0 comments on commit 3ae4c1d

Please sign in to comment.