WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
42670
Would like a way to break into the debugger when the web process launches
https://bugs.webkit.org/show_bug.cgi?id=42670
Summary
Would like a way to break into the debugger when the web process launches
Adam Roben (:aroben)
Reported
2010-07-20 14:34:18 PDT
Would like a way to break into the debugger when the web process launches
Attachments
Patch
(1.65 KB, patch)
2010-07-20 14:35 PDT
,
Adam Roben (:aroben)
andersca
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Adam Roben (:aroben)
Comment 1
2010-07-20 14:35:55 PDT
Created
attachment 62112
[details]
Patch
Anders Carlsson
Comment 2
2010-07-20 14:37:23 PDT
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().
Adam Roben (:aroben)
Comment 3
2010-07-20 14:40:00 PDT
(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!
Adam Roben (:aroben)
Comment 4
2010-07-20 15:01:38 PDT
Committed
r63777
: <
http://trac.webkit.org/changeset/63777
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug