| OLD | NEW |
| 1 # Use Qt Creator as IDE or GUI Debugger | 1 # Use Qt Creator as IDE or GUI Debugger |
| 2 | 2 |
| 3 [Qt Creator](https://www.qt.io/ide/) | 3 [Qt Creator](https://www.qt.io/ide/) |
| 4 ([Wiki](https://en.wikipedia.org/wiki/Qt_Creator)) is a cross-platform C++ IDE. | 4 ([Wiki](https://en.wikipedia.org/wiki/Qt_Creator)) is a cross-platform C++ IDE. |
| 5 | 5 |
| 6 You can use Qt Creator as a daily IDE or just as a GDB frontend and that does | 6 You can use Qt Creator as a daily IDE or just as a GDB frontend and that does |
| 7 not require project configuration. | 7 not require project configuration. |
| 8 | 8 |
| 9 [TOC] | 9 [TOC] |
| 10 | 10 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 93 |
| 94 1. Tools - Options - Build & Run - Debuggers, make sure GDB is set. | 94 1. Tools - Options - Build & Run - Debuggers, make sure GDB is set. |
| 95 2. Tools - Options - Kits, change the Desktop kit to GDB(LLDB doesnot work in | 95 2. Tools - Options - Kits, change the Desktop kit to GDB(LLDB doesnot work in |
| 96 Linux). | 96 Linux). |
| 97 3. Open file you want to debug. | 97 3. Open file you want to debug. |
| 98 4. Debug - Start Debugging - Attach to running Application, you may need to | 98 4. Debug - Start Debugging - Attach to running Application, you may need to |
| 99 open chrome's task manager to find the process number. | 99 open chrome's task manager to find the process number. |
| 100 | 100 |
| 101 ### Tips, tricks, and troubleshooting | 101 ### Tips, tricks, and troubleshooting |
| 102 | 102 |
| 103 #### Make GDB start fast | |
| 104 | |
| 105 Add `gdb_index = true` to `gn args`. | |
| 106 | |
| 107 #### Debugger shows start then finish | 103 #### Debugger shows start then finish |
| 108 | 104 |
| 109 ``` | 105 ``` |
| 110 $ echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope | 106 $ echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope |
| 111 ``` | 107 ``` |
| 112 | 108 |
| 113 Ensure yama allow you to attach another process. | 109 Ensure yama allow you to attach another process. |
| 114 | 110 |
| 115 #### Debugger do not stop in break point | 111 #### Debugger do not stop in break point |
| 116 | 112 |
| 117 Ensure you are using GDB not LLDB in Linux. | 113 Ensure you are using GDB not LLDB in Linux. |
| 118 | 114 |
| 119 #### More | 115 #### More |
| 120 | 116 |
| 121 See | 117 See |
| 122 https://chromium.googlesource.com/chromium/src/+/master/docs/linux_debugging.md | 118 https://chromium.googlesource.com/chromium/src/+/master/docs/linux_debugging.md |
| OLD | NEW |