Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debugger statement is swallowed #974

Open
hontvari opened this issue Nov 25, 2024 · 3 comments
Open

debugger statement is swallowed #974

hontvari opened this issue Nov 25, 2024 · 3 comments

Comments

@hontvari
Copy link
Contributor

It seems that javascript debugger statements are missing from the generated code.

Here is the overlay class:

public interface JsLang {
    @JSBody(script = "debugger; console.log('XXX'); debugger")
    static void debugger() {}
}

Here is the generated code:

fjj_JsLang_debugger$js_body$_0 = () => {

    console.log('XXX');

},

Even the lines are there for the debugger statements but they are empty.

@konsoletyper
Copy link
Owner

Perpahs. But why do you need this?

@hontvari
Copy link
Contributor Author

Perpahs. But why do you need this?

It is just more convenient inserting the 'debugger' statement into the IDE into the code I am already woring on, then searching for the line in the browser plain text source map viewer.

@konsoletyper
Copy link
Owner

  1. If you are using IDEA, you can install TeaVM plugin and put breakpoints right in IDE
  2. You can also enable source maps and put breakpoints right in Java/Kotlin/Scala source files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants