# LLDB

**URL:** https://forums.swift.org/c/development/lldb/13.md

[Latest](https://forums.swift.org/latest.md) · [Categories](https://forums.swift.org/categories.md) · [Tags](https://forums.swift.org/tags.md)

---

## [About the LLDB category](https://forums.swift.org/t/about-the-lldb-category/19)

<div class="topic-metadata">

**Author:** [@system](https://forums.swift.org/u/system)\
**Replies:** 0\
**Last updated:** [January 18, 2018, 7:44am UTC](https://forums.swift.org/t/about-the-lldb-category/19 "2018-01-18T07:44:47Z")

</div>

For developers to discuss the implementation of the Swift REPL and Swift-specific aspects of LLDB. This category will accept email sent to: swift+lldb@forums.swift.org

---

## [PLUGIN\_SEARCH\_OPTION in swiftmodule make it not cacheable](https://forums.swift.org/t/plugin-search-option-in-swiftmodule-make-it-not-cacheable/78895)

<div class="topic-metadata">

**Author:** [@wizzardchao](https://forums.swift.org/u/wizzardchao)\
**Replies:** 5\
**Last updated:** [September 29, 2026, 5:59pm UTC](https://forums.swift.org/t/plugin-search-option-in-swiftmodule-make-it-not-cacheable/78895 "2026-09-29T17:59:20Z")

</div>

As swift 6.x starts to use different swiftmodule for TypeSystemSwiftTypeRefForExpression when constructing swift ast context, we are required to provide all our swiftmodules to linker with -add-ast-path . with --serializ…

---

## [Issues when using LLDB with OpenOCD & the SVD2LLDB plugin](https://forums.swift.org/t/issues-when-using-lldb-with-openocd-the-svd2lldb-plugin/84703)

<div class="topic-metadata">

**Author:** [@iCMDdev](https://forums.swift.org/u/iCMDdev)\
**Replies:** 8\
**Last updated:** [March 9, 2026, 8:50pm UTC](https://forums.swift.org/t/issues-when-using-lldb-with-openocd-the-svd2lldb-plugin/84703 "2026-03-09T20:50:35Z")

</div>

Hello, I am trying to write a guide on how to use LLDB with Swift Embedded and the SVD2LLDB plugin, which allows you to read hardware registers with a semantic, human-friendly interface. However, we've ran into some iss…

---

## [\[Pitch\] Bump Python's required version from 3.9 to 3.11](https://forums.swift.org/t/pitch-bump-pythons-required-version-from-3-9-to-3-11/80883)

<div class="topic-metadata">

**Author:** [@c\_zablit](https://forums.swift.org/u/c_zablit)\
**Replies:** 25\
**Last updated:** [March 7, 2026, 2:47pm UTC](https://forums.swift.org/t/pitch-bump-pythons-required-version-from-3-9-to-3-11/80883 "2026-03-07T14:47:51Z")

</div>

I would like to propose that the required version of Python for LLDB be bumped from 3.9 to 3.11 or higher. Motivation When installing the ARM64 Swift toolchain on Windows, users have to install Python 3.9 ARM64. However…

---

## [Funny linking error while compiling for Swift 5 with some construct for 6](https://forums.swift.org/t/funny-linking-error-while-compiling-for-swift-5-with-some-construct-for-6/85054)

<div class="topic-metadata">

**Author:** [@fbartolom](https://forums.swift.org/u/fbartolom)\
**Replies:** 0\
**Last updated:** [February 28, 2026, 12:27pm UTC](https://forums.swift.org/t/funny-linking-error-while-compiling-for-swift-5-with-some-construct-for-6/85054 "2026-02-28T12:27:53Z")

</div>

When I compile my app I receive no errors, but for a final linking error hampering the installation I have no cue about: this is the log file around the log: libsystem\_kernel.dylib\`\_\_pthread\_kill: 0x2502f71c8 \<+0\>: …

---

## [Swift in Jupyter](https://forums.swift.org/t/swift-in-jupyter/81418)

<div class="topic-metadata">

**Author:** [@anutosh491](https://forums.swift.org/u/anutosh491)\
**Replies:** 16\
**Last updated:** [January 22, 2026, 11:30am UTC](https://forums.swift.org/t/swift-in-jupyter/81418 "2026-01-22T11:30:27Z")

</div>

Hi, This is Anutosh here (a Project Jupyter and an llvm/clang member) but more importantly a swift newbie :slight\_smile: At Project Jupyter, we are trying to bring all languages to the browser using JupyterLite & Web A…

---

## [Odd, persistent LLDB message about class methods](https://forums.swift.org/t/odd-persistent-lldb-message-about-class-methods/78032)

<div class="topic-metadata">

**Author:** [@moreindirection](https://forums.swift.org/u/moreindirection)\
**Replies:** 6\
**Last updated:** [December 26, 2025, 5:35pm UTC](https://forums.swift.org/t/odd-persistent-lldb-message-about-class-methods/78032 "2025-12-26T17:35:10Z")

</div>

I regularly get this error when evaluating expressions in LLDB: error: \<EXPR\>:4:20: class methods are only allowed within classes; use 'static' to declare a static method final class func $\_\_lldb\_user\_expr\_30(\_ $\_\_lld…

---

## [LLDB Negative Cache](https://forums.swift.org/t/lldb-negative-cache/77271)

<div class="topic-metadata">

**Author:** [@chiragramani](https://forums.swift.org/u/chiragramani)\
**Replies:** 8\
**Last updated:** [May 21, 2025, 6:49pm UTC](https://forums.swift.org/t/lldb-negative-cache/77271 "2025-05-21T18:49:33Z")

</div>

In Xcode, the LLDB variables view always beachballs for a bit when debugging a Swift file with type aliases referencing other typealiases. Here’s the relevant source code: open class SomeWorkflowStep\<A, B\> {} public t…

---

## [LLDB-RPC-Server Playgrounds Crash](https://forums.swift.org/t/lldb-rpc-server-playgrounds-crash/75659)

<div class="topic-metadata">

**Author:** [@Sean.Batson](https://forums.swift.org/u/Sean.Batson)\
**Replies:** 3\
**Last updated:** [April 15, 2025, 11:13am UTC](https://forums.swift.org/t/lldb-rpc-server-playgrounds-crash/75659 "2025-04-15T11:13:23Z")

</div>

For some reason the following crashes on Xcode 16.1 RC Playgrounds Platforms iOS, Swift 6. No issues on Swift 5 import Cocoa protocol VirtualPaksProtocol { associatedtype Base var base: Base { get } } struct V…

---

## [LLDB Slow Breakpoints Despite Disabling Swift C++ Interop](https://forums.swift.org/t/lldb-slow-breakpoints-despite-disabling-swift-c-interop/78514)

<div class="topic-metadata">

**Author:** [@chiragramani](https://forums.swift.org/u/chiragramani)\
**Replies:** 12\
**Last updated:** [March 19, 2025, 11:45pm UTC](https://forums.swift.org/t/lldb-slow-breakpoints-despite-disabling-swift-c-interop/78514 "2025-03-19T23:45:01Z")

</div>

We’re running into a performance issue with LLDB when hitting a breakpoint in a specific file. The function(in lldb-rpc-server sample) takes around ~10 seconds when a breakpoint is triggered lldb\_private::Module::IsSwif…

---

## [LLDB prints wrong UUID value](https://forums.swift.org/t/lldb-prints-wrong-uuid-value/78622)

<div class="topic-metadata">

**Author:** [@AlexBlack559](https://forums.swift.org/u/AlexBlack559)\
**Replies:** 3\
**Last updated:** [March 18, 2025, 9:26pm UTC](https://forums.swift.org/t/lldb-prints-wrong-uuid-value/78622 "2025-03-18T21:26:44Z")

</div>

LLDB prints the wrong UUID value when unwrapping it as an associated value within a switch‑case statement. let's consider following example: enum MyEnum { case firstCase(UUID) } let myEnum = MyEnum.firstCase(UUID(…

---

## [LLDB Stuck in llvm::vfs:: Loop](https://forums.swift.org/t/lldb-stuck-in-llvm-loop/78135)

<div class="topic-metadata">

**Author:** [@chiragramani](https://forums.swift.org/u/chiragramani)\
**Replies:** 1\
**Last updated:** [March 3, 2025, 10:26pm UTC](https://forums.swift.org/t/lldb-stuck-in-llvm-loop/78135 "2025-03-03T22:26:26Z")

</div>

We’re experiencing an issue where LLDB freezes when debugging certain AST contexts. The sampled stack trace suggests that LLDB is stuck in an infinite loop with the following calls involved: llvm::vfs::RedirectingFileS…

---

## [Swift LLDB and Diff Patch Model Context Protocol Server](https://forums.swift.org/t/swift-lldb-and-diff-patch-model-context-protocol-server/78045)

<div class="topic-metadata">

**Author:** [@mbalex99](https://forums.swift.org/u/mbalex99)\
**Replies:** 0\
**Last updated:** [February 23, 2025, 3:36am UTC](https://forums.swift.org/t/swift-lldb-and-diff-patch-model-context-protocol-server/78045 "2025-02-23T03:36:39Z")

</div>

Hi Swift community, I've gotten quite used to needing AI-enabled code editors like Cursor and Windsurf. But I've noticed that often the LLM while debugging has to write a lot of print statements during test driven devel…

---

## [Lldb is slow to resolve local vars](https://forums.swift.org/t/lldb-is-slow-to-resolve-local-vars/32517)

<div class="topic-metadata">

**Author:** [@beefon](https://forums.swift.org/u/beefon)\
**Replies:** 86\
**Last updated:** [February 6, 2025, 10:20pm UTC](https://forums.swift.org/t/lldb-is-slow-to-resolve-local-vars/32517 "2025-02-06T22:20:32Z")

</div>

We have a large Swift app with 150+ modules. Whenever I set breakpoint in Swift code in Xcode, LLDB takes at least 60 seconds to resolve types of local variables on hot pause and 5+ minutes if I kill lldb-rpc-server. I'…

---

## [Xcode 14.1 debugger: "error: Couldn't realize type of self"](https://forums.swift.org/t/xcode-14-1-debugger-error-couldnt-realize-type-of-self/61545)

<div class="topic-metadata">

**Author:** [@yoasha](https://forums.swift.org/u/yoasha)\
**Replies:** 6\
**Last updated:** [January 6, 2025, 10:29am UTC](https://forums.swift.org/t/xcode-14-1-debugger-error-couldnt-realize-type-of-self/61545 "2025-01-06T10:29:25Z")

</div>

I recently added Swift to my existing objective-c static library project and encountering issues when debugging Swift code. When code stops at a breakpoint and I enter a po command, such as: po title, I get: error: ex…

---

## [Trouble building lib/liblldb.so.17.0.0 on 6.0.1 using manually built 5.10.1](https://forums.swift.org/t/trouble-building-lib-liblldb-so-17-0-0-on-6-0-1-using-manually-built-5-10-1/75610)

<div class="topic-metadata">

**Author:** [@vaikas](https://forums.swift.org/u/vaikas)\
**Replies:** 28\
**Last updated:** [October 31, 2024, 10:38am UTC](https://forums.swift.org/t/trouble-building-lib-liblldb-so-17-0-0-on-6-0-1-using-manually-built-5-10-1/75610 "2024-10-31T10:38:48Z")

</div>

I hope this is the correct category to post. I have successfully (I think?) built the 5.10.1 based on these instructions here: Building the Swift Project on Linux with lld instead of gold - #24 by itaiferber (thanks!!) …

---

## [Lldb: Unable to bind generic parameters in context with weakly captured self](https://forums.swift.org/t/lldb-unable-to-bind-generic-parameters-in-context-with-weakly-captured-self/74236)

<div class="topic-metadata">

**Author:** [@stuchlej](https://forums.swift.org/u/stuchlej)\
**Replies:** 1\
**Last updated:** [August 29, 2024, 4:36pm UTC](https://forums.swift.org/t/lldb-unable-to-bind-generic-parameters-in-context-with-weakly-captured-self/74236 "2024-08-29T16:36:41Z")

</div>

Hello, I have opened an issue regarding LLDB, see lldb: Unable to bind generic parameters in context with weakly captured self · Issue #9194 · swiftlang/llvm-project · GitHub . TL;DR: If you capture weakly a generic c…

---

## [Location-based error breakpoints (feature request)](https://forums.swift.org/t/location-based-error-breakpoints-feature-request/73610)

<div class="topic-metadata">

**Author:** [@JetForMe](https://forums.swift.org/u/JetForMe)\
**Replies:** 1\
**Last updated:** [August 1, 2024, 1:11pm UTC](https://forums.swift.org/t/location-based-error-breakpoints-feature-request/73610 "2024-08-01T13:11:05Z")

</div>

I've found the break-on-Swift-error to be almost useless at this point, because so many libraries routinely throw errors. You have to place a breakpoint, enable the error breakpoint, then resume. I wish I could set a sp…

---

## [SymbolFileDWARF::FindTypes is called too many times (apparently)](https://forums.swift.org/t/symbolfiledwarf-findtypes-is-called-too-many-times-apparently/72902)

<div class="topic-metadata">

**Author:** [@dmt](https://forums.swift.org/u/dmt)\
**Replies:** 4\
**Last updated:** [July 4, 2024, 4:11pm UTC](https://forums.swift.org/t/symbolfiledwarf-findtypes-is-called-too-many-times-apparently/72902 "2024-07-04T16:11:44Z")

</div>

I was debugging slow expression evaluation in lldb in my project and noticed that most of the time is spent on calling the functions SymbolFileDWARF::FindTypes and SymbolFileDWARF::FindFunctions. And a lot of these calls…

---

## [LLDB fails to load Clang explicit modules due to class\_ro\_t pointer authentication mismatch when using Xcode 13.3](https://forums.swift.org/t/lldb-fails-to-load-clang-explicit-modules-due-to-class-ro-t-pointer-authentication-mismatch-when-using-xcode-13-3/57480)

<div class="topic-metadata">

**Author:** [@ivhernandez](https://forums.swift.org/u/ivhernandez)\
**Replies:** 1\
**Last updated:** [April 23, 2024, 10:27pm UTC](https://forums.swift.org/t/lldb-fails-to-load-clang-explicit-modules-due-to-class-ro-t-pointer-authentication-mismatch-when-using-xcode-13-3/57480 "2024-04-23T22:27:10Z")

</div>

Debugging with explicit modules has started failing on XCode 13.3 and newer. The exact error I'm seeing is: warning: (x86\_64) /Users/ivhernandez13/dev/ClassROTPointerAuth/.build/x86\_64-apple-macosx/debug/ClassROTPointer…

---

## [\[Pitch\] Include lldb-dap in Swift toolchain](https://forums.swift.org/t/pitch-include-lldb-dap-in-swift-toolchain/70135)

<div class="topic-metadata">

**Author:** [@adam-fowler](https://forums.swift.org/u/adam-fowler)\
**Replies:** 6\
**Last updated:** [April 11, 2024, 6:37am UTC](https://forums.swift.org/t/pitch-include-lldb-dap-in-swift-toolchain/70135 "2024-04-11T06:37:18Z")

</div>

I would like to propose that lldb-dap (The LLDB debug adapter from the llvm-project) be included in the Swift toolchain. It is currently included in the Swift Windows toolchain but not in the Linux and macOS versions. M…

---

## [LLDB support for Swift async frames for Windows x86\_64](https://forums.swift.org/t/lldb-support-for-swift-async-frames-for-windows-x86-64/69799)

<div class="topic-metadata">

**Author:** [@Alex\_L](https://forums.swift.org/u/Alex_L)\
**Replies:** 5\
**Last updated:** [February 8, 2024, 4:48pm UTC](https://forums.swift.org/t/lldb-support-for-swift-async-frames-for-windows-x86-64/69799 "2024-02-08T16:48:47Z")

</div>

Hi, LLDB currently has special extended frame support for Swift async frames for x86\_64 and arm64. Unfortunately, it doesn't work correctly with windows x86\_64 frame layout, as it makes an assumption that the previous f…

---

## [Xcode 15: po self error when i debug a framework!](https://forums.swift.org/t/xcode-15-po-self-error-when-i-debug-a-framework/69492)

<div class="topic-metadata">

**Author:** [@mrkizy](https://forums.swift.org/u/mrkizy)\
**Replies:** 4\
**Last updated:** [January 19, 2024, 12:03am UTC](https://forums.swift.org/t/xcode-15-po-self-error-when-i-debug-a-framework/69492 "2024-01-19T00:03:45Z")

</div>

I have a framework and .dsym file, and I have a source code in my computer. when i hit a breakpoint, i run po self, it shows error below(other commands such as v self, i works well): po self error: Expression evaluat…

---

## [LLDB: Print valued returned by a function](https://forums.swift.org/t/lldb-print-valued-returned-by-a-function/68416)

<div class="topic-metadata">

**Author:** [@AlexanderM](https://forums.swift.org/u/AlexanderM)\
**Replies:** 4\
**Last updated:** [November 13, 2023, 3:50am UTC](https://forums.swift.org/t/lldb-print-valued-returned-by-a-function/68416 "2023-11-13T03:50:04Z")

</div>

LLDB supports printing the return value of a function. Here's an example in Xcode, on a simple C project: It appears that this behaviour isn't available in Swift. I wasn't able to find any related issues on the Swift…

---

## [Lldb-rpc-server crashes when running SwiftUI applications](https://forums.swift.org/t/lldb-rpc-server-crashes-when-running-swiftui-applications/67088)

<div class="topic-metadata">

**Author:** [@cgudrian](https://forums.swift.org/u/cgudrian)\
**Replies:** 1\
**Last updated:** [September 12, 2023, 3:54pm UTC](https://forums.swift.org/t/lldb-rpc-server-crashes-when-running-swiftui-applications/67088 "2023-09-12T15:54:09Z")

</div>

Hello! I'm on a fresh install of Ventura 13.6 with Xcode 14.3.1. If I create a new macOS SwiftUI application and run it, the application itself starts and runs without problems. However lldb-rpc-server crashes with a SI…

---

## [Building LLDB](https://forums.swift.org/t/building-lldb/66947)

<div class="topic-metadata">

**Author:** [@adam-fowler](https://forums.swift.org/u/adam-fowler)\
**Replies:** 3\
**Last updated:** [September 11, 2023, 2:28pm UTC](https://forums.swift.org/t/building-lldb/66947 "2023-09-11T14:28:53Z")

</div>

The instructions to build LLDB don't seem to work. I have built a full macOS toolchain and would now like to just build LLDB. The README in the lldb folder says I can build it using ./swift/utils/build-script -r --lldb …

---

## [Version of LLVM used by Swift](https://forums.swift.org/t/version-of-llvm-used-by-swift/66819)

<div class="topic-metadata">

**Author:** [@adam-fowler](https://forums.swift.org/u/adam-fowler)\
**Replies:** 21\
**Last updated:** [August 24, 2023, 5:47pm UTC](https://forums.swift.org/t/version-of-llvm-used-by-swift/66819 "2023-08-24T17:47:48Z")

</div>

Hi, How do I tell which branch of llvm-project is used to build the Swift compiler? In particular which branch is being used to build the Swift 5.9 release.

---

## [Debugging SIL in LLDB](https://forums.swift.org/t/debugging-sil-in-lldb/66378)

<div class="topic-metadata">

**Author:** [@jkshtj](https://forums.swift.org/u/jkshtj)\
**Replies:** 1\
**Last updated:** [July 31, 2023, 4:21pm UTC](https://forums.swift.org/t/debugging-sil-in-lldb/66378 "2023-07-31T16:21:35Z")

</div>

Has anyone ever tried debugging SIL code in LLDB as mentioned here? If yes, is there a way I can print a SIL value such as, %1 in LLDB?

---

## [\[SOLVED\] LLDB failed when I connected my c++ lib](https://forums.swift.org/t/solved-lldb-failed-when-i-connected-my-c-lib/63712)

<div class="topic-metadata">

**Author:** [@SpectralDragon](https://forums.swift.org/u/SpectralDragon)\
**Replies:** 2\
**Last updated:** [March 15, 2023, 11:42am UTC](https://forums.swift.org/t/solved-lldb-failed-when-i-connected-my-c-lib/63712 "2023-03-15T11:42:28Z")

</div>

I connected C++ library to my executable SPM project and set -enable-experimental-cxx-interop to swift settings, and when I try to debug with LLDB, I received the next error messages (lldb) po self error: expression fai…

---

## [\[lldb\] Cannot load underlying module error](https://forums.swift.org/t/lldb-cannot-load-underlying-module-error/32537)

<div class="topic-metadata">

**Author:** [@zienag](https://forums.swift.org/u/zienag)\
**Replies:** 17\
**Last updated:** [February 19, 2023, 10:01am UTC](https://forums.swift.org/t/lldb-cannot-load-underlying-module-error/32537 "2023-02-19T10:01:58Z")

</div>

Hi! We have a longstanding problem – unable to execute any expressions and print variables in lldb in swift. In our project we have a lot of modules and semi-complicated dependency chain, and lldb error depends in which…

[Next page](https://forums.swift.org/c/development/lldb/13.md?page=1)
