Hey, guys, I'm trying to debug/profile my Kotlin/N...
# kotlin-native
b
Hey, guys, I'm trying to debug/profile my Kotlin/Native (linux/amd64) app inside IntelliJ and I just noticed my run configurations seem not to be recognized anymore (image below). If I go ahead and run them anyway, I get the following message:
Copy code
Unknown run configuration type KonanRunConfiguration
What am I missing here? I remember those used to just work, and if I needed to add breakpoints and debug the code, that would work just fine was well. I have the
Native Debugging Support
plugin installed, but I'm maybe I need something else for those run configurations to work? Even without
KonanRunConfiguration
, how can I debug Kotlin/Native currently? If I launch my app through Gradle, the debugger does not attach to the process (as I would expect, because Gradle spawns the app as a separate process, I think).
r
Are you using the Ultimate edition of IDEA? Debug doesn't work on the Community edition: https://youtrack.jetbrains.com/issue/KTIJ-25100
b
yes, Idea Ultimate I even deleted the
.idea
folder, but still no luck debugging Kotlin/Native
r
mmm strange, if you check your configurations after a gradle sync, do you see a section for Kotlin/Native Applications?
b
where should I look for that? Is that the run configuration dialog? I don't see that at all
r
yes it is, how does your K/N build gradle look like? maybe there is some misconfiguration. Also, are you 100% sure that the Native Debugging Support plugin is installed and enabled?
b
yes, 100% sure plugin is installed
I'm away from the PC now, but I'll try a simpler project and see what happens.
👍 1
what version of idea are you using?
r
IntelliJ IDEA 2024.3.2.2 (Ultimate Edition)
do you use K2 mode? (
Settings | Languages & Frameworks | Kotlin | Enable K2 Mode
) if yes, try to disabling it, I get the same issues you have if it's enabled
btw the plugin is currently broken for me: I get an EDT error when I try to debug with it (but running the binaries works fine): https://youtrack.jetbrains.com/issue/KTIJ-32938/Kotlin-Native-Debugging-Fails-Access-is-allowed-from-EDT-only-Error-in-IntelliJ-IDEA
b
Yeah, my launch configs show up again if I revert to K1, and I have the same error.
Thanks for pointing the issue, I'll upvote it.
👍 1
BTW, do we have a ticket to have
KonanApp
back on K2? I think we need to track this
r
if there is, I don't know it 🤷
b