When building for a web frontend target, is there ...
# javascript
r
When building for a web frontend target, is there a better way to view errors than the default messages printed to the browser console? I find myself staring at a
NullPointerException
error constantly, but the error message just refers to a line number in the compiled JS, which is useless (as far as I have been able to determine) in tracing back to where the exception comes from. Is there a tool or method to trace this sort of exception back to the Kotlin source at all?
r
Enable source maps. You will get kotlin source code file names and line numbers in the browser console.
r
Thank you, I haven’t seen this feature referred to anywhere in the documentation so far. I will look into it.