How can I attach a debugger to a running ktor appl...
# ktor
l
How can I attach a debugger to a running ktor application that I'm running using the
runDocker
Gradle task? I know this is trivial to do with IntelliJ if you have a Dockerfile...I think...but not sure how this works when using
runDocker
a
Have you tried running a "Remote JVM Debug" configuration?
l
I was looking for that under Run/Debug configurations, but couldn't find it.
Should I be looking elsewhere?
a
Do you have the IDEA Ultimate edition?
l
You bet!
image.png
Imagine not having Ultimate 😆
a
image.png
l
doh, there it is. Thank you
I need more coffee
While I have you @Aleksei Tirman [JB] Do you know if it's possible to have environment variables passed to Gradle? In my Run Configuration I have added some env vars, but
System.getenv
in my
build.gradle.kts
still returns
null
, which makes me think IntelliJ doesn't pass env vars to Gradle.
a
It's possible, but if you use a Run configuration of type Kotlin, the configured env variables are passed only to the java command, not Gradle.
119 Views