// swift-tools-version: 6.2
import PackageDescription
let GUILinkerSettings: [LinkerSetting] = [
.unsafeFlags(["-Xlinker", "/SUBSYSTEM:WINDOWS"], .when(configuration: .release)),
// Update the entry point to point to the generated swift function, this lets us keep the same main method
// for debug/release
.unsafeFlags(["-Xlinker", "/ENTRY:mainCRTStartup"], .when(configuration: .release)),
]
let package = Package(
name: "Compositor-Windows",
products: [
.executable(
name: "Compositor",
targets: ["Compositor"]),
],
dependencies: [
// .package(url: "https://github.com/ktraunmueller/swift-cwinrt", branch: "main"),
// .package(url: "https://github.com/ktraunmueller/swift-uwp", branch: "main"),
// .package(url: "https://github.com/ktraunmueller/swift-windowsfoundation", branch: "main"),
// .package(url: "https://github.com/ktraunmueller/swift-windowsappsdk", branch: "main"),
// .package(url: "https://github.com/ktraunmueller/swift-winui", branch: "main"),
// .package(url: "https://github.com/ktraunmueller/swift-plugins", branch: "main")
.package(path: "../../../winrt/swift-cwinrt"),
.package(path: "../../../winrt/swift-uwp"),
.package(path: "../../../winrt/swift-win2d"),
.package(path: "../../../winrt/swift-windowsappsdk"),
.package(path: "../../../winrt/swift-windowsfoundation"),
.package(path: "../../../winrt/swift-winui"),
.package(path: "../Core")
],
targets: [
.executableTarget(
name: "Compositor",
dependencies: [
.product(name: "CompositorCore", package: "Core"),
.product(name: "CWinRT", package: "swift-cwinrt"),
.product(name: "UWP", package: "swift-uwp"),
.product(name: "Win2D", package: "swift-win2d"),
.product(name: "WinAppSDK", package: "swift-windowsappsdk"),
.product(name: "WindowsFoundation", package: "swift-windowsfoundation"),
.product(name: "WinUI", package: "swift-winui"),
],
swiftSettings: [.interoperabilityMode(.Cxx)],
linkerSettings: GUILinkerSettings
),
],
swiftLanguageModes: [.v5]
)
I have a swift-winrt based Windows desktop app.
Debugging works fine in the app executable, but when trying to step over (some, not all) breakpoints in other modules (see
Package.swiftbelow), the debugger crashes withlldbcommand-line debugging is mostly working fine, so it looks this is an issue in the toolchain'slldb-dapdebug adapter, not some general problem with my debugger setup.Sorry, I know this is very thin information, unfortunately I haven't found more clues on how to reproduce or narrow this down.
Environment:
The app's Package.swift