Current time: 12-15-2017, 08:49 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to breakpoint and debug the wpthook
01-17-2017, 05:08 PM
Post: #1
How to breakpoint and debug the wpthook
Hi Patrick
I installed the WPT Private Instances and it is helpful for us to improve the page performance. Now we have some customize requirements(e.g. show the DNS Lookup or Initial Connection time in the result table of summary or details page for the base page url) so I setup the DEV environment to debug the WPT Agent first.
When i set the breakpoint in WPTDriver, it will pause at the breakpoint and i can check the parameters and values.
But when i set the breakpoint in WPTHook(e.g. void Results::SavePageData in result.cc) and then start a test but it won't pause at the breakpoint. And then i add some customize code (check the snapshot result.cc.png) to see if it is effictive. Then i check the result file in 1_IEWPG.txt.gz file (check the snapshot IEWPG.png), it shows it is effectively for the customize code.
The result file shows the full path of the application(browser) which is injected the DLL(wpthook.dll) file. Then i tried to set the full path of the browser exe file in wpthook project Property>Configurations Properties>Debugging>Command field and "Yes" for Attach field. But it is still can't pause at the breakpoint.
I use Webpagetest 2.19 and the Visual Studio 2013. I am a new recruit, please help me about how can i debug and set the breakpoint in wpthook.
Thanks
Tom
       
Find all posts by this user
Quote this message in a reply
01-24-2017, 03:05 AM
Post: #2
RE: How to breakpoint and debug the wpthook
In wpthook.cc there is a commented-out message box call that I use when I'm trying to attach a debugger: https://github.com/WPO-Foundation/webpag...ok.cc#L120

That way you can run a test normally and when the message-box appears you attach to the process that owns the dialog.
Visit this user's website Find all posts by this user
Quote this message in a reply
02-03-2017, 06:58 PM
Post: #3
RE: How to breakpoint and debug the wpthook
(01-24-2017 03:05 AM)pmeenan Wrote:  In wpthook.cc there is a commented-out message box call that I use when I'm trying to attach a debugger: https://github.com/WPO-Foundation/webpag...ok.cc#L120

That way you can run a test normally and when the message-box appears you attach to the process that owns the dialog.

Thank you! I got it.Tongue
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)