class MyTest : ShouldSpec({
val foo = "bar"
should("do something") {
true shouldBe true // place breakpoint here
}
})
If I run the test using the Kotest plugin in debug mode and place a breakpoint at the
true shouldBe true
line I don’t see the
foo
variable captured in the “Variables” window like I would expect.
I recall being able to debug this relatively recently so I think this is a new issue.
Kotlin version — 1.5.30
IntelliJ version — IntelliJ IDEA 2021.2.2 (Ultimate Edition) Build #IU-212.5284.40
Kotest version — 4.6.1
Kotest plugin version — 1.1.36-IC-2021.1
* Not a contribution *
James Eschner
09/16/2021, 9:09 PM
to perhaps make this a bit more concrete here are some screenshots
* not a contribution *
o
Oliver.O
09/17/2021, 1:51 PM
Isn't that something related to the debugger rather than to Kotest?
j
James Eschner
09/17/2021, 1:58 PM
Certainly could be!
s
sam
09/17/2021, 3:02 PM
Sometimes you can work around by assigning the var to a val before the line where you debug