| 46 | |
| 47 | In WebKit2, the UI process will spawn new Web processes so it can be tricky to debug those with gdb. If you need to debug a crash in a WebProcess, you can use the "-webprocess-cmd-prefix=<prefix>" argument to run-webkit-tests (in debug mode only). For example, if you want the new Web processes to be executed in gdb, you can use the following command: |
| 48 | |
| 49 | {{{ |
| 50 | ./Tools/Scripts/run-webkit-tests -2 --efl --webprocess-cmd-prefix="xterm -title WebProcess -e gdb --args" LayoutTests/fast/forms/plaintext-mode-1.html |
| 51 | }}} |
| 52 | |
| 53 | The "xterm" is necessary or gdb will run in the current terminal, which can get particularly confusing since it's running in the background, and if you're also running the main process in gdb, won't work at all (the two instances will fight over the terminal). |
| 54 | |
| 55 | To auto-start the web processes in the debugger, send the "run" command to the debugger: |
| 56 | |
| 57 | {{{ |
| 58 | ./Tools/Scripts/run-webkit-tests -2 --efl --webprocess-cmd-prefix="xterm -title WebProcess -e gdb --eval-command=run --args" LayoutTests/fast/forms/plaintext-mode-1.html |
| 59 | }}} |
| 60 | |
| 61 | If you want to do the same thing when executing the EFL MiniBrowser, you can do it by properly setting the "WEB_PROCESS_CMD_PREFIX" environment variable: |
| 62 | |
| 63 | {{{ |
| 64 | WEB_PROCESS_CMD_PREFIX="xterm -title WebProcess -e gdb --args" WebKitBuild/Debug/bin/MiniBrowser |
| 65 | }}} |