How exactly do you debug js browser tests running through karma?
No matter how I change my gradle or karma config, or how I try to hit a breakpoint in the tests (either through debuggable chrome or attaching through the IDE) the browser just closes after a few seconds
Derek Ellis
12/20/2022, 8:35 PM
I don't even really care about being able to step through my Kotlin code, I just want to the browser to stay open long enough for me to use a debugger at all
j
jw
12/20/2022, 8:39 PM
probably want to disable the default test timeout
jw
12/20/2022, 8:39 PM
or set it to a ridiculous amount
jw
12/20/2022, 8:39 PM
i think it's 2s by default in karma
d
Derek Ellis
12/20/2022, 8:52 PM
I tried adjusting every configurable timeout that karma (and mocha) offer but to no avail
m
Mike Dawson
12/22/2022, 1:16 PM
I think unless you have IntelliJ ultimate, you're mostly stuck using console.log .
I was able to get the browser to stay open before by running gradle with --info, spotting the karma config, and then changing the option that makes it close after the test finishes,