You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have a Gradle project with Kotlin (JVM), Ktor and ktor-html-builder / kotlinx-html open in IntelliJ IDEA
Use call.respondHtml() to build the response using HTML DSL, as describe here on the Ktor docs
Place a breakpoint somewhere in the HTML DSL (see screenshot for example)
Note: this is inside of a suspend function
Trigger the route with a matching request
Expected Result
The IDE stops at the breakpoint
The debugger shows the values of any variables in scope in the "Variables" section, like any other regular breakpoint
Actual Result
The IDE stops at the breakpoint
The debugger shows the (names of the) variables in the "Variables" section
But no values are shown at first; instead, the text "Collecting data..." is shown
(Note: in some situations, I have observed that not even the list of variables is shown immediately, instead showing a single "Collecting data..." in its place)
The debugger takes several minutes, during which CPU usage is very high (>80% of multiple cores) and memory usage keeps increasing (the IDE shows a hint at some point that its allocated memory is insufficient).
Further Notes
I have not been able to isolate this issue to just Ktor or just kotlinx-html (or just the IDE). So far, I've only observed it in this combination.
IDE: IntelliJ IDEA 2020.1.1 (Community Edition) (Build #IC-201.7223.91, Runtime version: 11.0.6+8-b765.40 x86_64, VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o)
Reproduction Steps
call.respondHtml()
to build the response using HTML DSL, as describe here on the Ktor docsExpected Result
Actual Result
Further Notes
Version Info:
Reproduction Example
The text was updated successfully, but these errors were encountered: