mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-19 00:43:54 +08:00
* feat: add debugging configurations for replay drive and LLDB attachment * Add readme with video demo * clean * docs: update debugging safety documentation with demo link * no need for mp4 then added on PR * Update SConstruct * bump opendbc * updating readme * updating readme * updating readme * is this better / worth it? * final cleanups * hacky. but does it work? * Yep that worked! --------- Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
1.2 KiB
1.2 KiB
Debugging Panda Safety with Replay Drive + LLDB
1. Start the debugger in VS Code
2. Attach LLDB
- When prompted, pick the running
replay_driveprocess. - ⚠️ Attach quickly, or
replay_drivewill start consuming messages.
Tip
Add a Python breakpoint at the start of
replay_drive.pyto pause execution and give yourself time to attach LLDB.
3. Set breakpoints in VS Code
Breakpoints can be set directly in modes/xxx.h (or any C file).
No extra LLDB commands are required — just place breakpoints in the editor.
4. Resume execution
Once attached, you can step through both Python (on the replay) and C safety code as CAN logs are replayed.
Note
- Use short routes for quicker iteration.
- Pause
replay_driveearly to avoid wasting log messages.
Video
View a demo of this workflow on the PR that added it: https://github.com/commaai/openpilot/pull/36055#issue-3352911578