https://kotlinlang.org logo
#kobweb
Title
# kobweb
f

Funyinoluwa Kashimawo

09/27/2023, 8:16 PM
This worked a bit. But I couldn't get into the jvm code https://kotlinlang.org/docs/js-debugging.html#debug-in-the-ide
d

David Herman

09/27/2023, 8:53 PM
Oh wow! There's an IJ Ultimate solution?? I had no idea
If you want to debug JVM, you'll probably have to set up remote debugging manually. I haven't tried it, but you can get the PID from the message that Kobweb shows you.
https://www.jetbrains.com/help/idea/attaching-to-local-process.html looking at this, it's possible I'll need to do something on my end (I need to allow you to configure starting up a kobweb server with a debug agent running)
I'll take a bit to investigate today, in case it's trivial.
Looks like it was trivial. I will be adding support for debugging the backend in 0.14.1, which at the moment is going out tomorrow! I'll put information in the README about how to do it.
🎉 1
c

CLOVIS

09/28/2023, 12:24 PM
Debugging Kotlin/JS in IDEA is… difficult. It sometimes works really well, and then stops working altogether. I've had multiple times where IDEA reported variables to be
undefined
when they were, in fact, not.
Getting the source maps to work… well, I haven't managed it yet, maybe Kobweb did?
d

David Herman

09/28/2023, 6:13 PM
@Funyinoluwa Kashimawo new release out today (https://github.com/varabyte/kobweb/releases/tag/v0.14.1) with support for remote debugging your servers. Note that this is potentially a disruptive library update (see the release notes for more), but it should at worst be an easy migration. If you try out the remote debugging feature, please let me know how it goes for you!
@CLOVIS No idea about the source maps. I just copy what the build process generates into resources that get served by a server. I don't use Ultimate myself (trying to keep my workflow the same as my users) so no idea how well this works or not.
f

Funyinoluwa Kashimawo

09/28/2023, 8:07 PM
Thanks @David Herman I'll check it out.
2 Views