Fix breakpoints from Kotlin file placed in irrelevant class (KT-19429)
State that there're no locations in given file, if all locations for line were filtered out because of wrong file name. Need this because if we throw exception, other positions managers may return locations without explicit check for file type or file name. See PositionManagerImpl.java #KT-19429 Fixed
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
package stopInWrongClass
|
||||
|
||||
class A {
|
||||
fun test() {
|
||||
// Breakpoint 1
|
||||
foo()
|
||||
}
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package stopInWrongClass
|
||||
|
||||
class AA {
|
||||
fun test() {
|
||||
// Should be on the same line with Breakpoint 1
|
||||
foo()
|
||||
}
|
||||
|
||||
fun other() {
|
||||
//Breakpoint!
|
||||
foo()
|
||||
}
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
// Shouldn't stop inside test()
|
||||
AA().test()
|
||||
AA().other()
|
||||
}
|
||||
|
||||
// ADDITIONAL_BREAKPOINT: stopInWrongClass.Other.kt: Breakpoint 1
|
||||
@@ -0,0 +1,9 @@
|
||||
LineBreakpoint created at stopInWrongClass.Other.kt:6
|
||||
LineBreakpoint created at stopInWrongClass.kt:11
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
stopInWrongClass.kt:11
|
||||
stopInWrongClass.kt:12
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Reference in New Issue
Block a user