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

#1327 A "Chrome Debug" session can now be started even when a chrome window is already open #1328

Conversation

Si-So
Copy link
Contributor

@Si-So Si-So commented Sep 8, 2023

Rationale

The "vscode-chrome-debug" debugger can either be instructed to start chrome from a specific path or it can try to locate chrome itself. See here: https://github.com/microsoft/vscode-chrome-debug/blob/master/src/chromeDebugAdapter.ts
If going for the first option the runtimeExecutable parameter must be specified. This is what wwd currently does and what causes #1327

In contrast, here is a typical launch.json from VSCode:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "type": "chrome",
            "request": "launch",
            "name": "Launch Chrome against localhost",
            "url": "http://localhost:4200/",
            "webRoot": "${workspaceFolder}/src",
            "sourceMaps":true
        }
    ]
}

Instead of using the runtimeExecutable parameter, VSCode uses the type and launch parameters. When the type and launch parameters are used "vscode-chrome-debug" locates the chrome executable itself. This fixes #1327

I am not sure why it fixes #1327, but it does.

Appendix

This only fixes "Chrome Debug" and not "Running Chrome Debug Instance". I suspect that "Running Chrome Debug Instance" can be fixed in the same way. After also fixing "Running Chrome Debug Instance" the class ChromeExecutableTab probably becomes obsolete. The method findChromeLocation in ChromeRunDAPDebugDelegate can probably also be deleted.

…rted even when a chrome window is already open
@mickaelistria
Copy link
Contributor

Indeed, it looks like vscode-chrome-debug plugin does a better job at finding chrome that Wild Web Developer does, so it's a good thing it we can rely on it more.

@mickaelistria mickaelistria merged commit 6c5dbcb into eclipse-wildwebdeveloper:master Sep 11, 2023
1 of 4 checks passed
@mickaelistria
Copy link
Contributor

Thank you!

@Si-So
Copy link
Contributor Author

Si-So commented Sep 11, 2023

Thank you for merging :)

Before merging my PR: I also found it quite strange that you even could select a browser in "Chrome Debug".

@mickaelistria
Copy link
Contributor

Before merging my PR: I also found it quite strange that you even could select a browser in "Chrome Debug".

At this stage, you currently seem like the most expert contributor regarding Chrome debug integration. So at least I, and probably others, trust your judgement here and would welcome any PR that in your opinion removes some "strangeness".

@Si-So
Copy link
Contributor Author

Si-So commented Sep 11, 2023

Thank you :)

For now, I am quite happy with the state of wwd regarding "Chrome Debug" and I do not plan to work on it further.

A little bit off topic: When do you plan to release the next version of wwd?

@mickaelistria
Copy link
Contributor

We don't plan much, this is a bit "on-demand" and according to availability of committers.
However, let me turn the question upside-down: why would you need a release?

@Si-So
Copy link
Contributor Author

Si-So commented Sep 11, 2023

Yeah I noticed that your release are "on-demand".

I would like to have a release because this makes it easier for other employees from my company to get my changes.

Manually deploying locally built plugin-jars is harder than saying: "Please update this plugin from the official repo".

@mickaelistria
Copy link
Contributor

There is an official repo with snapshots which you can share with your colleagues to install a build including your latest contributions: https://download.eclipse.org/wildwebdeveloper/snapshots/

@Si-So
Copy link
Contributor Author

Si-So commented Sep 11, 2023

Oh, I didn't know that. Thank you :)

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

Successfully merging this pull request may close these issues.

Starting a "Chrome Debug" session does not work when chrome is already open
2 participants