用 Remote Debugging 查看 ChatGPT Mac App 的 UI 实现
一个挺实用的小技巧:给 ChatGPT Mac 版加个启动参数,就能用 Chrome DevTools 直接扒它的界面实现,前端同学可以试试。
通过命令行启动 ChatGPT.app 并加上 --remote-debugging-port=8315 参数,可以开启远程调试端口。
然后在 Chrome 输入 chrome://inspect/ 打开 Remote Target,从列表中找到 ChatGPT app://-/index.html 并点击 inspect。
接着会弹出 DevTools 窗口,可以像调试普通网页一样查看 Codex/ChatGPT Mac App 的 UI 结构。整个流程只需四步,无需任何额外工具。
如果你想 Debug Codex/ChatGPT 的 Mac App 的 UI 实现 1. 退出正在运行的 Codex App 2. 命令行窗口执行: $ open /Applications/ChatGPT.app --args --remote-debugging-port=8315 --remote-allow-origins= http://localhost:8315 2. Chrome 里面输入 chrome://inspect/ 打开 Remote Target 3. 从列表中找到 ChatGPT app://-/index.html,点击 inspect 4. 就会弹出 DevTools 窗口看到 Codex UI,像 Debug 普通网页一样 Debug Codex 了📊 2 ⚡
This report is categorized under AITOP's "How-to" desk, focusing on US frontier AI labs and Silicon Valley technology leaders. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include ChatGPT, Codex, DevTools, debugging tips.
Source attribution: curated from 宝玉 (@dotey).