How can I add debug points to statements in for-comprehension?
for {
a <- sqlQuery1()
b <- sqlQuery2()
} yield {
// output
}
I want to inspect as each of the above queries are executed, but simply adding debug points does not seem to work. The queries get executed without ever hitting debug points. I am not sure if it is a limitation of the library being used, language or IDE.
Here is my setup:
- Scala
- IntelliJ IDEA 14.1.3
- Scala Plugin 1.5.200
- Library - Slick 3.0 (Using DBIO Actions)
Update:
Case 1: with slick
Debug points don't work. Confirmed that again.
Case 2: w/o slick
Debugger does stop at debug points. But sometimes it evaluates expressions and sometimes it does not. I have noticed following problems (in currying / anonymous functions):
- Variable value is shown as 'Size = ?'
- Variable value is 'Debug info unavailable'
- Fails to evaluate expression
- Cursor stays on the same line without highlighting anything whenever I step over (it is doing things in the background though)
- 'Warning: No executable code found at...'
Actually searching without slick as keyword showed me that a lot of people have similar issues, like here.