Felt deceived by this warning message when compile in Android Studio. Not seeing this warning message would be better than seeing one.
I was working on a Java based Android Project. So to introduce Kotlin, I created a class in Kotlin with all that required setup. All should be good as I have done this many times.
I put a break point in my Kotlin code, and started the debugging process. After compiled and the app started, I saw the warning below
The currently selected Java debugger doesn’t support breakpoints of type ‘Kotlin Line Breakpoints’. As a result, these breakpoints will not be hit.
The debugger selection can be modified in the run configuration dialog.
My debug point is not triggered at all, and the app just run through. The debug break point is shown as not-attached.
Oh… what comes to my mind is, something wrong with my Java compiler Searching high and low, trying to change configuration…. nothing works.
After searching high and low. I decided to just do a normal trace and simple check… It turn out that it’s a a very simple and silly mistake I made…
I didn’t call my Kotlin code from any where!!!
It’s as simple as that. The debug point did not triggered because it is not linked to any code. It is NOT Java debugger’s fault at all.
Do try it out on Android Studio 2.3.2… you’ll see this.
Thinking over it, if I have not see this warning message, I might have found out the reason sooner than later. Well sharing with you a little pain, and hopes will save you some time. This is a good example of
A wrong warning is worst than no warning.
I hope you appreciate this post and it’s helpful for you. Do share with others.
You could check out my other interesting topics here.