惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
云风的 BLOG
云风的 BLOG
Microsoft Azure Blog
Microsoft Azure Blog
F
Fortinet All Blogs
A
About on SuperTechFans
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 司徒正美
P
Proofpoint News Feed
D
Docker
Jina AI
Jina AI
Apple Machine Learning Research
Apple Machine Learning Research
The Cloudflare Blog
I
InfoQ
Recorded Future
Recorded Future
爱范儿
爱范儿
Last Week in AI
Last Week in AI
J
Java Code Geeks
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
M
MIT News - Artificial intelligence
L
LINUX DO - 热门话题
腾讯CDC
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
IT之家
IT之家
博客园_首页
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
C
CXSECURITY Database RSS Feed - CXSecurity.com
L
Lohrmann on Cybersecurity
The Last Watchdog
The Last Watchdog
V
Visual Studio Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
P
Privacy International News Feed
博客园 - 三生石上(FineUI控件)
Schneier on Security
Schneier on Security
Simon Willison's Weblog
Simon Willison's Weblog
Martin Fowler
Martin Fowler
雷峰网
雷峰网
Latest news
Latest news
Scott Helme
Scott Helme
T
Tenable Blog
Vercel News
Vercel News
宝玉的分享
宝玉的分享
PCI Perspectives
PCI Perspectives
Help Net Security
Help Net Security
L
LINUX DO - 最新话题
Attack and Defense Labs
Attack and Defense Labs
Spread Privacy
Spread Privacy
量子位
H
Heimdal Security Blog

Butler's Log

Agentic Version Control Benchmarks Grit: rewriting Git in Rust with agents Git Merge 2026 Agent-safe Git with GitButler We’ve raised $17M to build what comes after Git Announcing the GitButler CLI for Linux The Great CSS Expansion A couple of git nits Simplifying Git by Using GitButler Introducing the GitButler CLI GitButler 0.19 - "Commander Keen" But Head: Crafting a Custom Font MCP vs RAG: Two Very Different Ways to Gain Context Getting Started With GitButler Agents Using the GitButler MCP Server to Build Better AI-Driven Git Workflows Using GitButler With Multiple GitHub Accounts Advent of Code! Upcoming GitButler Events Use GitButler for your Gerrit workflow Integrating GitButler and GitHub Enterprise Butler Flow: shipping code faster (but less like Alfred, more like CI on steroids) - Part 3 Butler Flow: shipping code faster (but less like Alfred, more like CI on steroids) - Part 2 Butler Flow: shipping code faster (but less like Alfred, more like CI on steroids) - Part 1 Grid Happens: Because Flexbox Wasn’t Enough Using Cursor Hooks for automatic version control Deep Dive into the new Cursor Hooks A Responsive Item Counter with CSS only GitButler 0.16 - "Sweet Sixteen" GitButler's Claude Code tab GitButler's Annual Open Source Pledge Report Git Mini Summit 2025 Videos Automate Your AI Workflows with Claude Code Hooks Managing Multiple Claude Code Sessions Without Worktrees GitButler 0.15 - "Quirky Quinceañera" 20 years of Git. Still weird, still wonderful. GitButler's new patch based Code Review (Beta) Going down the rabbit hole of Git's new bundle-uri How to do patch-based review with git range-diff How Core Git Developers Configure Git Why is Git Autocorrect too fast for Formula One drivers? Stacked Branches with GitButler Git Merge 2024 Talks are Up GitButler 0.13 - "Lucky Baseball" Fearless Rebasing Git Merge 2024 Why GitHub Actually Won GitButler is joining the Open Source Pledge The New Era of Town Hall Chat The Future of Open Source GitButler is now Fair Source Git Merge 2024 GitButler 0.12 - "Stingy Baker" The Birth of THE MERGE GitButler for Windows Fixing up Git with Autosquash The Git Zeitgeist Git Worktrees and GitButler DevWorld Git Slides Git Tips and Tricks Git Tips 1: Oldies but Goodies Git Tips 2: New Stuff in Git Git Tips 3: Really Large Repositories FOSDEM Git Talk Opening Up GitButler Advent of GitButler Code Signing Commits in Git, Explained Virtual Branches Alpha Our We Are Developers Adventure Building Virtual Branches DevDays in Vilnius The Future of Software and Open Source Introducing GitButler
Debugging Tauri in VS Code
Scott Chacon · 2023-12-05 · via Butler's Log

At GitButler, we're building our client in Tauri. Tauri is a framework for writing multi-platform GUI tools. It's similar to Electron and also uses HTML/JS/CSS for the frontend UI, but instead of Node on the backend it relies on Rust for filesystem access.

One of the challenges is in debugging the Rust code that we're running.

Most of us develop GitButler using VS Code, which has some integrated debugging capabilities, but not in a way that's necessarily easy to use with the Tauri binary that we're building. Since we couldn't find any good tutorials on this on the internets and recently got it working, we figured we would share our solution for anyone else out there running into this.

No more dbg!() for us!

Setting up VS Code and LLDB

We're using the LLDB debugger for our Rust debugging. To play along, you'll need the CodeLLDB (vadimcn.vscode-lldb) VS Code plugin and lldb installed (and in your PATH).

It's the best when the toolchain and version matches with whatever you're using to build (e.g. if you're using clang-15 or llvm-15, make sure it's lldb-15).

If you're on Linux and lldb doesn't work for some reason (e.g. you're under WSL, which notoriously hates lldb) GDB should work but is not 'officially' supported to run LLVM-based applications. Given this is Rust, everything is compiled via LLVM, so lldb is the 'go to' debugger.

You'll need to know the path to the binary that is actually being run - many projects have a few wrapper scripts and processes but you can only debug the actual Tauri process, which we don't invoke directly, and you may not be either.

For us, it's actually just target/debug/GitButler Dev. Debugging on Release mode is possible but you aren't going to get much usefulness out of it.

The script we used to verify which binary is actually being run this is (replace "GitButler Dev" with the title of the window you're observing):

SHELL

osascript -e 'on run argv
    set windowTitle to item 1 of argv
    tell application "System Events"
        set allProcesses to every process
        repeat with i from 1 to count allProcesses
            set thisProcess to item i of allProcesses
            if exists (window 1 of thisProcess) then
                repeat with j from 1 to count (windows of thisProcess)
                    set thisWindow to window j of thisProcess
                    if name of thisWindow is windowTitle then
                        return unix id of thisProcess
                    end if
                end repeat
            end if
        end repeat
    end tell
    return -1
end run' "GitButler Dev"

which returns the $PID, after which you can run ps aux | grep $PID to find the image name. That's what we need to run and debug.

The Tauri CLI for dev mode just spins up the local web server and then starts this process. So, if you're debugging, you need to start the web server (for example, with pnpm run dev) and let that sit in the background. Then you can run the Tauri app directly from VSCode's debugging system.

1. (One-time setup) Drop the launch.json file (found at the bottom of the post) into your /.vscode directory. If one is there already, merge the entries in the JSON array. 2. Start the web server in its own terminal window: pnpm run dev 3. Build the project (debugging from VSCode does NOT automatically build for you - if you forget to do this, your breakpoints and line numbers etc. will get messed up): pnpm run build:development 4. Start the debugger directly from VS Code: Run -> Start Debugging 5. If you've changed the Rust source at all, you'll have to go back to step 3.

Here is the launch.json

JS

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "lldb",
            "request": "launch",
            "name": "GitButler Dev",
            "program": "${workspaceFolder}/target/debug/GitButler Dev",
            "args": [],
            "cwd": "${workspaceFolder}"
        }
    ]
}

This now allows you to use the LLDB debugger directly from within VS Code to set breakpoints and otherwise debug the Rust portion of your Tauri app. 🎉

Scott Chacon

Written by Scott Chacon

Scott Chacon is a co-founder of GitHub and GitButler, where he builds innovative tools for modern version control. He has authored Pro Git and spoken globally on Git and software collaboration.