CLion Swift plugin is no compatible with latest swift version

Answered

Hi, I cannot run Swift code in CLion using your plugin. I am sending screenshot, too. Am I missing something?

0
10 comments

Looks like you have a  development snapshot. For 3.1.1 only the release build is supported. Alternatively, you can try 4.0 snapshots. They might be unstable, but Swift plugin will not refuse working with them.

1
Avatar
Permanently deleted user

Thanks a lot, now it's working! I just cannot use debugger to see what is stored in each variable. It doesn't work in macOS Clion neither.

0

Please make sure that the "Use Swift debugger" option is enabled in the Swift plugin settings.

0
Avatar
Permanently deleted user

It was not. But I have enabled it and it's still not working. It was enabled in macOS Clion and it didn't work neither.

0

Global variables/constants are not displayed by CLion, because in large projects they can quickly pollute the scope. Please try creating a function and see if it works in there.

0
Avatar
Permanently deleted user

OK, now it shows the type but not value stored in property.

0

Please make sure that the binary was built with exactly the same toolchain, as the one specified in the plugin settings. If it is, then:

 

  1. Invoke Help -> Debug Log Settings
  2. Type #com.jetbrains.cidr.execution.debugger
  3. Reproduce the problem
  4. Revert the debug log settings and attach the idea.log (Help -> Show Log)
0
Avatar
Permanently deleted user
0

According to the log, LLDB returns empty descriptions for these variables. Unfortunately, I don't have any other explanation: something's wrong with the binary. Most likely, it was built with a different toolchain. Please make sure that the swift compiler in CMakeLists.txt is correct, then delete the entire cmake-build-debug directory and try again.

 

0
Avatar
Permanently deleted user

I have tried to make whole new CLion project and it didn't help. So maybe it's just a bug. The Clion shoud be set up properly because in C++ project it works fine.

0

Please sign in to leave a comment.