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

How to launch browser with a custom URL from another extension without devtools? #2677

Closed
priyanshu92 opened this issue Jan 9, 2025 · 3 comments · Fixed by #2721
Closed
Labels
bug Something isn't working enhancement New feature or request tracked

Comments

@priyanshu92
Copy link

priyanshu92 commented Jan 9, 2025

I am writing a VS Code extension and looking to invoke await vscode.commands.executeCommand('vscode-edge-devtools.launch'); with a specific URL like https://example.com from my extension.

However, when I execute the above command, it is opening a static HTML page.

  1. Is there a way to pass a custom URL to open to the above command?
  2. Is there a way I can stop Edge: DevTools window from opening? I only want to open browser window.

AB#55932240

@vidorteg vidorteg added the bug Something isn't working label Jan 17, 2025
@vidorteg
Copy link
Contributor

For #1
I initially thought this could be #2416, but it does not seem to be the case as #2416 does not repro on the latest version. I think you are talking about the contribution points, at least programatically it should be possible to pass arguments such as the url. So I'll bring this to the team and see what I can do

For #2
Unfortunately no. Features as headless mode, which screencast the browser content are designed to serve as a visual guide for developers, and only support a minimal set of features that the browser supports, showing the browser without the devtools might mislead users who might believe they have a full working browser embedded in vscode. For more advanced debugging or for people who have multiple screens we suppport the non-headless mode which is a full browser.

@vidorteg vidorteg added enhancement New feature or request and removed bug Something isn't working labels Jan 18, 2025
@priyanshu92
Copy link
Author

Thank you @vidorteg for your response.

Yes for #1, I am looking for an ability to programmatically pass the URL as a parameter to launch call. Something like await vscode.commands.executeCommand('vscode-edge-devtools.launch', { url: 'https://example.com' });

@priyanshu92
Copy link
Author

Thank you @vidorteg for the quick turnaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request tracked
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants