Summary: | Would like a way to break into the debugger when the web process launches | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Adam Roben (:aroben) <aroben> | ||||
Component: | New Bugs | Assignee: | Adam Roben (:aroben) <aroben> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | ||||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Other | ||||||
OS: | OS X 10.5 | ||||||
Attachments: |
|
Description
Adam Roben (:aroben)
2010-07-20 14:34:18 PDT
Created attachment 62112 [details]
Patch
Comment on attachment 62112 [details] Patch > extern "C" __declspec(dllexport) > int WebKitMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpstrCmdLine, int nCmdShow) > { Please add a comment here indicating the key combination and what this does. Can ::GetKeyState change between calls? If so, should you keep it in a variable? > +#ifndef NDEBUG > + const unsigned short highBitMaskShort = 0x8000; > + if ((::GetKeyState(VK_CONTROL) & highBitMaskShort) && (::GetKeyState(VK_MENU) & highBitMaskShort) && (::GetKeyState(VK_SHIFT) & highBitMaskShort)) > + DebugBreak(); This should be ::DebugBreak(). (In reply to comment #2) > (From update of attachment 62112 [details]) > > extern "C" __declspec(dllexport) > > int WebKitMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpstrCmdLine, int nCmdShow) > > { > > Please add a comment here indicating the key combination and what this does. Added: // 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. > Can ::GetKeyState change between calls? If so, should you keep it in a variable? Not without returning to the message loop. GetKeyState returns the state of the keys when the last input message was generated. (We can't keep it in a variable anyway, since you have to pass the key you care about to the function.) > > +#ifndef NDEBUG > > + const unsigned short highBitMaskShort = 0x8000; > > + if ((::GetKeyState(VK_CONTROL) & highBitMaskShort) && (::GetKeyState(VK_MENU) & highBitMaskShort) && (::GetKeyState(VK_SHIFT) & highBitMaskShort)) > > + DebugBreak(); > > This should be ::DebugBreak(). ::OK. *grumble* Thanks for reviewing! Committed r63777: <http://trac.webkit.org/changeset/63777> |