I dont get the values of variables when i mouse ov...
# javascript
a
I dont get the values of variables when i mouse over when i debug my code. i do see them on the debug console though in IDEA. is that normal? if not, what am i missing?
How i setup the js target:
Copy code
kotlin {
    jvmToolchain(17)
    js {
        nodejs()
        binaries.library()

        useEsModules()
        compilerOptions {
            sourceMap = true
            sourceMapEmbedSources = JsSourceMapEmbedMode.SOURCE_MAP_SOURCE_CONTENT_ALWAYS
        }
    }
a
Hi @Alex Styl. Right now, the answer is yes (unfortunately). It's a limitation of the debug format used by the IDE/Browsers for Wasm and JavaScript. However, we participated in extending this format, and quite soon the new feature for the debug format (https://github.com/tc39/ecma426/blob/main/proposals/scopes.md) will be landed in the spec (and it was already landed in V8). So, we would like to add support for the feature in the IDE and have the compiler generate the information. I will create the task for the compiler tomorrow, so as not to forget to support the feature. Unfortunately, it's hard to predict when it will be fully available for the end-user since three parties should add support for the feature: the browser (to run it by default without any flag), the IDE, and the compiler.
a
thanks for confirming i am on nodejs btw, not browser
a
I would be so happy to hear your use-case (you can describe it in DM if it's not public information) kodee loving
a
building my backends using kotlin/js and expressjs. i would like to be able to set breakpoints and inspect values on requests easier. right now i log each value
e
I do wonder tho, how does VS Code does it? Does it inspect all scopes looking for the variable name? If I debug my Kotlin code from VS Code (as I do when I debug VS Code extensions) I'm able to hover the variable or property and get its value via tooltip.
🤔 1
For completeness here is a screenshot. No highlight as I don't have the Kotlin LSP installed (not even sure it would work currently).