OLD | NEW |
1 # Tips for debugging on Linux | 1 # Tips for debugging on Linux |
2 | 2 |
3 This page is for Chromium-specific debugging tips; learning how to run gdb is | 3 This page is for Chromium-specific debugging tips; learning how to run gdb is |
4 out of scope. | 4 out of scope. |
5 | 5 |
6 [TOC] | 6 [TOC] |
7 | 7 |
8 ## Symbolized stack trace | 8 ## Symbolized stack trace |
9 | 9 |
10 The sandbox can interfere with the internal symbolizer. Use `--no-sandbox` (but | 10 The sandbox can interfere with the internal symbolizer. Use `--no-sandbox` (but |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 --gtest_filter="MyBrowserTest.MyActivateWindowTest" | 368 --gtest_filter="MyBrowserTest.MyActivateWindowTest" |
369 | 369 |
370 ### BROWSER_WRAPPER | 370 ### BROWSER_WRAPPER |
371 | 371 |
372 You can also get the browser under a debugger by setting the `BROWSER_WRAPPER` | 372 You can also get the browser under a debugger by setting the `BROWSER_WRAPPER` |
373 environment variable. (You can use this for `browser_tests` too, but see above | 373 environment variable. (You can use this for `browser_tests` too, but see above |
374 for discussion of a simpler way.) | 374 for discussion of a simpler way.) |
375 | 375 |
376 BROWSER_WRAPPER='xterm -e gdb --args' out/Debug/browser_tests | 376 BROWSER_WRAPPER='xterm -e gdb --args' out/Debug/browser_tests |
377 | 377 |
378 ### Replicating Trybot Slowness | 378 ### Replicating try bot Slowness |
379 | 379 |
380 Trybots are pretty stressed, and can sometimes expose timing issues you can't | 380 Try bots are pretty stressed, and can sometimes expose timing issues you can't |
381 normally reproduce locally. | 381 normally reproduce locally. |
382 | 382 |
383 You can simulate this by shutting down all but one of the CPUs | 383 You can simulate this by shutting down all but one of the CPUs |
384 (http://www.cyberciti.biz/faq/debian-rhel-centos-redhat-suse-hotplug-cpu/) and | 384 (http://www.cyberciti.biz/faq/debian-rhel-centos-redhat-suse-hotplug-cpu/) and |
385 running a CPU loading tool (e.g., http://www.devin.com/lookbusy/). Now run your | 385 running a CPU loading tool (e.g., http://www.devin.com/lookbusy/). Now run your |
386 test. It will run slowly, but any flakiness found by the trybot should replicate | 386 test. It will run slowly, but any flakiness found by the try bot should replicat
e |
387 locally now - and often nearly 100% of the time. | 387 locally now - and often nearly 100% of the time. |
388 | 388 |
389 ## Logging | 389 ## Logging |
390 | 390 |
391 ### Seeing all LOG(foo) messages | 391 ### Seeing all LOG(foo) messages |
392 | 392 |
393 Default log level hides `LOG(INFO)`. Run with `--log-level=0` and | 393 Default log level hides `LOG(INFO)`. Run with `--log-level=0` and |
394 `--enable-logging=stderr` flags. | 394 `--enable-logging=stderr` flags. |
395 | 395 |
396 Newer versions of chromium with VLOG may need --v=1 too. For more VLOG tips, see | 396 Newer versions of Chromium with VLOG may need --v=1 too. For more VLOG tips, see |
397 [the chromium-dev thread](http://groups.google.com/a/chromium.org/group/chromium
-dev/browse_thread/thread/dcd0cd7752b35de6?pli=1). | 397 [the chromium-dev thread](http://groups.google.com/a/chromium.org/group/chromium
-dev/browse_thread/thread/dcd0cd7752b35de6?pli=1). |
398 | 398 |
399 ### Seeing IPC debug messages | 399 ### Seeing IPC debug messages |
400 | 400 |
401 Run with `CHROME_IPC_LOGGING=1` eg. | 401 Run with `CHROME_IPC_LOGGING=1` eg. |
402 | 402 |
403 CHROME_IPC_LOGGING=1 out/Debug/chrome | 403 CHROME_IPC_LOGGING=1 out/Debug/chrome |
404 | 404 |
405 or within gdb: | 405 or within gdb: |
406 | 406 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 [Running layout tests on Linux](layout_tests_linux.md) page. | 537 [Running layout tests on Linux](layout_tests_linux.md) page. |
538 | 538 |
539 If you need to test something with hardware accelerated compositing | 539 If you need to test something with hardware accelerated compositing |
540 (e.g., compiz), you can use `Xgl` (`sudo apt-get install xserver-xgl`). E.g.: | 540 (e.g., compiz), you can use `Xgl` (`sudo apt-get install xserver-xgl`). E.g.: |
541 | 541 |
542 Xgl :1 -ac -accel glx:pbuffer -accel xv:pbuffer -screen 1024x768 | 542 Xgl :1 -ac -accel glx:pbuffer -accel xv:pbuffer -screen 1024x768 |
543 | 543 |
544 ## Mozilla Tips | 544 ## Mozilla Tips |
545 | 545 |
546 https://developer.mozilla.org/en/Debugging_Mozilla_on_Linux_FAQ | 546 https://developer.mozilla.org/en/Debugging_Mozilla_on_Linux_FAQ |
OLD | NEW |