RESOLVED FIXED 143837
It is very hard to attach a debugger to WebProcess to debug tests
https://bugs.webkit.org/show_bug.cgi?id=143837
Summary It is very hard to attach a debugger to WebProcess to debug tests
Alexey Proskuryakov
Reported 2015-04-16 12:10:35 PDT
When attaching a debugger to WebContent, one would normally hit a 5-second IPC timeout that WebKitTestRunner has. To safely debug, tests need to be run with something like: run-webkit-tests --additional-drt-flag="--no-timeout-at-all" --time-out-ms=100000000 This is despite having a nice --no-timeout option in run-webkit-tests. This is because --no-timeout only affects waitUntilDone timeout, and not IPC timeout or run-webkit-tests timeout. There is a claim (in <http://trac.webkit.org/changeset/123464>) that --no-timeout-at-all and --no-timeout needs to be different because of performance tests, but I don't see any evidence supporting that. I want to make "run-webkit-tests --no-timeout" disable all timeouts, as best for debugging.
Attachments
proposed fix (3.26 KB, patch)
2015-04-16 12:21 PDT, Alexey Proskuryakov
cdumez: review+
Alexey Proskuryakov
Comment 1 2015-04-16 12:21:51 PDT
Created attachment 250937 [details] proposed fix
WebKit Commit Bot
Comment 2 2015-04-16 12:24:55 PDT
Attachment 250937 [details] did not pass style-queue: ERROR: Tools/Scripts/webkitpy/port/driver.py:190: at least two spaces before inline comment [pep8/E261] [5] Total errors found: 1 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Chris Dumez
Comment 3 2015-04-16 14:28:50 PDT
Comment on attachment 250937 [details] proposed fix r=me
Geoffrey Garen
Comment 4 2015-04-16 15:11:28 PDT
Comment on attachment 250937 [details] proposed fix Maybe we should add a --debugger option, which auto-attaches a debugger after launching the Web Process, and also enables --no-timeout? 90% of the time, I would use that every time.
Chris Dumez
Comment 5 2015-04-16 15:18:11 PDT
(In reply to comment #4) > Comment on attachment 250937 [details] > proposed fix > > Maybe we should add a --debugger option, which auto-attaches a debugger > after launching the Web Process, and also enables --no-timeout? > > 90% of the time, I would use that every time. FYI, back when I was working on the EFL port I added a specific run-webkit-test parameter exactly for this purpose: --webprocess-cmd-prefix It is still in but the implementation probably needs to be adapted for Mac. On EFL port it is used like so: ./Tools/Scripts/run-webkit-tests --efl --webprocess-cmd-prefix="DISPLAY=:0 xterm -title WebProcess -e gdb --eval-command=run --args" LayoutTests/fast/forms/plaintext-mode-1.html
Alexey Proskuryakov
Comment 6 2015-04-16 15:51:01 PDT
> Maybe we should add a --debugger option, which auto-attaches a debugger after launching the Web Process, and also enables --no-timeout? The --debugger option wouldn't know if I want to debug WebKitTestRunner, WebContent or Networking. And adding an option for each... I don't know, I just want to attach to the process in Xcode as it launches.
Alexey Proskuryakov
Comment 7 2015-04-16 15:56:03 PDT
Committed r182916.
Note You need to log in before you can comment on or make changes to this bug.