# Module Tracking in Swift Debug Info

DevFeed: [Module Tracking in Swift Debug Info](<https://devfeed.tech/articles/module-tracking-in-swift-debug-info-91313.md>)

Original publisher: [Read original article](<https://www.swift.org/blog/module-tracking-in-debug-info/>)

Author: Adrian Prantl

Published: 2026-09-11T15:30:00Z

Content type: article

Language: en

Sources: [Swift.org](<https://devfeed.tech/sources/swift-org.md>)

Topics: [modules](<https://devfeed.tech/topics/modules.md>), [Swift](<https://devfeed.tech/topics/swift.md>), [import](<https://devfeed.tech/topics/import.md>), [swift-package-manager](<https://devfeed.tech/topics/swift-package-manager.md>), [bazel](<https://devfeed.tech/topics/bazel.md>), [CMake](<https://devfeed.tech/topics/cmake.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>)

Tags: [bazel](<https://devfeed.tech/tags/bazel.md>), [breakpoint](<https://devfeed.tech/tags/breakpoint.md>), [build](<https://devfeed.tech/tags/build.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [clang](<https://devfeed.tech/tags/clang.md>), [cmake](<https://devfeed.tech/tags/cmake.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compilers](<https://devfeed.tech/tags/compilers.md>), [data-types](<https://devfeed.tech/tags/data-types.md>), [debug](<https://devfeed.tech/tags/debug.md>), [debugger](<https://devfeed.tech/tags/debugger.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [evaluation](<https://devfeed.tech/tags/evaluation.md>), [expression](<https://devfeed.tech/tags/expression.md>), [functions](<https://devfeed.tech/tags/functions.md>), [import](<https://devfeed.tech/tags/import.md>), [info](<https://devfeed.tech/tags/info.md>), [module](<https://devfeed.tech/tags/module.md>), [swift](<https://devfeed.tech/tags/swift.md>), [tracking](<https://devfeed.tech/tags/tracking.md>)

## AI overview

Swift 6.3's explicit module tracking lets LLDB locate the exact Swift module for code at a breakpoint and follow its explicit Swift dependencies, avoiding ambiguous name-based lookup and slow implicit recompilation. SwiftPM and Xcode users get this through the Swift driver; custom build systems that invoke the frontend directly need to pass `-debug-module-path`. Starting with Swift 6.4, those systems can remove Linux and Windows `-modulewrap` steps and Darwin `-add_ast_path` linker options. Binary Swift modules will no longer be stored in dSYM bundles, making debug products smaller. LLDB can still inspect variables and print object descriptions using reflection metadata; complex expression evaluation requires modules to remain available at their original or remapped locations. Swift 6.4 also adds use of precompiled bridging headers for faster, more reliable debugging in explicitly built projects.

## Source excerpt

When your Swift program hits a breakpoint and stops so you can inspect it, the debugger's expression evaluator has to find the exact Swift module your code was built from. Until now, that lookup wasn't always precise. The upcoming Swift 6.4 release will include changes, begun in Swift 6.3, that address this by updating how the Swift compiler references explicitly-built Swift modules in debug info. The majority of developers will automatically benefit from faster, more reliable debugging and smaller build products, without any modifications to their SwiftPM or Xcode projects. For developers who maintain their own build systems using, for example, Bazel, Buck, or CMake, some adjustments may be necessary to take advantage of these changes. This article explains how the debugger uses Swift modules. Next, it describes how Swift 6.3 changes the way modules are tracked in debug info to solve several problems with the previous representation. Finally, it shows how to adjust build systems to take advantage of the new representation and eliminate some build steps that are no longer necessary. Swift modules and expression evaluation LLDB's standout feature is its powerful expression evaluator. Because LLDB embeds the Clang and Swift compilers, it can JIT-compile any valid source code and run it in the context of your application while stopped at a breakpoint. This includes not just calling code in your application, but also defining new data types, functions, and closures. Debugging features that are usually reserved for interpreted or JIT-compiled languages like JavaScript become available to ahead-of-time-compiled languages like C++ and, of course, Swift! In order to JIT-compile user expressions that make use of data types defined in the debugged program, LLDB's embedded Swift compiler needs to import the Swift modules defining those types. In a world before explicitly-built modules, LLDB would find the base name of the main module at the current breakpoint in the debug info