113 | | |
114 | | = Debugging = |
115 | | |
116 | | * [wiki:"Debugging With Visual Studio"]. |
117 | | |
118 | | WebKit has two logging features, `LOG` and `dataLog`. |
119 | | |
120 | | `LOG` is documented at [https://github.com/WebKit/WebKit/blob/main/Introduction.md#logging-in-webkit Logging in WebKit]. |
121 | | WebCore is using `LOG`. It outputs logs through `stderr` and `OutputDebugString` on Windows. |
122 | | |
123 | | Console applications (jsc.exe and WebKitTestRunner) can use `stderr`. |
124 | | GUI applications (MiniBrowser.exe) can't use `stderr`. |
125 | | You have to attach a debugger to see the message of `OutputDebugString`. |
126 | | You should use [https://trac.webkit.org/wiki/Debugging%20With%20Visual%20Studio#DebuggingMultipleProcesses Child Process Debugging Power Tool] to get messages of child processes. |
127 | | |
128 | | `dataLog` has no documents. It output logs through `stderr` or a file. |
129 | | It outputs to a file if you set a env var `WTF_DATA_LOG_FILENAME`. |
130 | | You have to enable JSC logging by set env vars, for example: |
131 | | {{{ |
132 | | set JSC_logGC=2 |
133 | | }}} |