Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CursorAI] Activating Swift extension failed: Failed to find lldb-dap in Swift toolchain #1069

Open
xzilja opened this issue Sep 14, 2024 · 4 comments
Assignees
Labels
bug Something isn't working needs investigation Issue requires some investigation before it can be worked on

Comments

@xzilja
Copy link

xzilja commented Sep 14, 2024

Describe the bug
I am trying out CursorAI which is an editor based off VSCode 1.91.1. Commonly there are no issues with extensions, but when I add Swift one, I get an error toast saying "Activating Swift extension failed: Failed to find lldb-dap in Swift toolchain".

After some googling around, common fix stated is "install swift", however when I run swift --version I do get following output

swift-driver version: 1.115 Apple Swift version 6.0 (swiftlang-6.0.0.9.10 clang-1600.0.26.2)
Target: arm64-apple-macosx15.0

So am currently not sure if there is anything else I could try, hence leading me to think that this might be a bug with either using cursor or swift 6.0?

I also did not get any prompts to set any extras up after installing the extension.

To Reproduce
Steps to reproduce the behavior:

  1. Download https://www.cursor.com
  2. Add Swift Extension, restart editor just in case
  3. Open any swift project that uses some import i.e. SwiftUI and you'll get errors all across when using any of the views
  4. Additionally observe error toast that pops up at the bottom left

Expected behavior
Should install and set everything up correctly.

Environment

  • OS: macOS Sequoia
  • Swift version:
swift-driver version: 1.115 Apple Swift version 6.0 (swiftlang-6.0.0.9.10 clang-1600.0.26.2)
Target: arm64-apple-macosx15.0
  • Visual Studio Code version: Version: 0.40.4, VSCode Version: 1.91.1
  • vscode-swift version: v1.11.0

Additional context

@xzilja xzilja added the bug Something isn't working label Sep 14, 2024
@plemarquand
Copy link
Contributor

Hi @xzilja, from inside Cursor could you do > Swift: Capture VS Code Swift Diagnostic Bundle, choose Capture Minimal Diagnostics and attach the results to this issue?

Do you have Xcode installed, have you installed a Swift toolchain from https://www.swift.org/download/, or none of the above?

In the meantime you can try working around this by setting "swift.debugger.useDebugAdapterFromToolchain": false in your VS Code user settings.json.

@xzilja
Copy link
Author

xzilja commented Sep 15, 2024

@plemarquand Sure thing, here are the results
extension-logs.txt
settings.txt

I have latest XCode 16 RC installed and did not install Swift toolchain separately (is this one of the requirements? I was under impression that it comes bundled with XCode when it is set up).

I tried adding "swift.debugger.useDebugAdapterFromToolchain": false but am still seeing a lot of "not found" errors like this one that happens for @Model macro from SwfitData for example (all is fine within XCode):

External macro implementation type 'SwiftDataMacros.PersistentModelMacro' could not be found for macro 'Model()'; plugin for module 'SwiftDataMacros' not foundSourceKit
MyTestModel.swift(5, 13): 'Model()' declared here (SwiftData.Model)

@plemarquand
Copy link
Contributor

Thanks for attaching more info. Xcode16 Beta should be sufficient, I was just trying to get an idea of how Swift was installed on your system.

@plemarquand
Copy link
Contributor

Apologies, I should have said set "swift.debugger.useDebugAdapterFromToolchain": true not false. That will use the lldb debug adapter from Xcode and not from the CodeLLDB VS Code extension.

@award999 award999 added the needs investigation Issue requires some investigation before it can be worked on label Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs investigation Issue requires some investigation before it can be worked on
Projects
None yet
Development

No branches or pull requests

4 participants