I have a breakpoint on a Kotlin class definition: ...
# intellij
p
I have a breakpoint on a Kotlin class definition:
Copy code
class MyClass(private val xyz: String)
It seems like the debuggers stops in the constructor which is what I would expect. I would like to add a condition to the breakpoint to only stop when
xyz
equals
"myString"
but it won't let me access
xyz
in the input field. Is this is a bug?
c
Interesting, it works for me. I set condition as
xyz == "myString"
and the debugger dutifully stops, if I change the condition to
!=
it doesn't stop. Can you provide more details, what exactly doesn't work? Is the condition dialogue showing an error, is the debugger not stopping, is there an exception?
p
The condition dialog highlights
xyz
in red as if the variable could never be in scope. I am glad it's supposed to work that way so maybe it's just a bug. Thanks for checking.
a
Failed to reproduce in a simple Gradle project with Kotlin plugin 1.3.50 + IDEA 2019.3 EAP. Which versions of Kotlin and IDEA are you using? Please file an issue at http://kotl.in/issue with your IDE logs attached. Thank you.
p
Thanks, I will file an issue when I come across it again. Might have been a fluke.
👍 1