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

Debugging Support #125

Open
Phillipus opened this issue Jan 24, 2024 · 2 comments
Open

Debugging Support #125

Phillipus opened this issue Jan 24, 2024 · 2 comments

Comments

@Phillipus
Copy link
Member

This is to track the work of @jbsarrodie to implement debugging of scripts in MS Edge and Chrome browsers.

Dev branch: dev-jb.

@Phillipus
Copy link
Member Author

Phillipus commented Jan 24, 2024

I'm testing on Windows with Edge and Chrome. The first problem is getting Edge or Chrome to launch with the debug URL. It opens Edge or Chrome, but not the URL.

Here's a simple test snippet:

import java.io.IOException;

public class Test {

    public static void main(String[] args) {
        String port = "9229";
        String editor = "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe";

        String path = java.util.UUID.randomUUID().toString();
        String url = "devtools://devtools/bundled/js_app.html?ws=127.0.0.1:" + port + "/" + path;

        String[] paths = new String[]{editor, url};

        try {
            Runtime.getRuntime().exec(paths);
        }
        catch(IOException ex) {
            ex.printStackTrace();
        }
    }
}

@Phillipus
Copy link
Member Author

@jbsarrodie I've tried everything I can think of to get Chrome or Edge on Windows to automatically open a URL with the devtools:// protocol and it just can't be done.

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

1 participant