-
Notifications
You must be signed in to change notification settings - Fork 0
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
Don't start birdseye if it's already running #7
Comments
wierd - when i run two birdseye's on the same port they both work. Maybe it is a OS-specific thing? What OS are you using? |
I'm using Mac, and that's normal behaviour on Linux too. I don't see how it could work otherwise - if two processes use the same port, how do you make sure a client talks to the right one? |
No clue but windows seems to think it's okay :/ I have a ubuntu VM so I can reproduce the problem on there. |
I reproduced the problem in my VM. simple solution to this: run birdseye in vscode under a different port. Let's say 7778, not sure if the exact number matters or not. benefits: dead simple and easy. No need to find cross-platform way of detecting if birdseye is running. drawbacks: if you are really unlucky you might happen to run birdseye using the same port vscode uses at the same time as running birdseye vscode. Thoughts? |
oh wait, it looks like you expose a environment variable to check if its running
In that case I just need to skip launching birdseye if that environment variable is present. Maybe display a info message to user telling them that birdseye is already running. Checking for a environment variable in javascript is super easy, not even any imports required. console.log(process.env.BIRDSEYE_SERVER_RUNNING) |
Nevermind, that is just a travis setting. Back to my original question, i guess - launch vscode birdseye under different port? |
Yes, it's just a travis setting. You need to:
|
Already done :)
It sounds a lot easier to just change the default port. |
Reopening in case of further discussion |
You don't have to reopen issues just in case, it's possible to discuss on closed issues :) My problem with changing the default port is that users may sometimes decide they'd like to open birdseye in a browser. Ideally this should work effortlessly without requiring anyone to look through documentation or configuration, which they might never think to do. They could solve the problem by running another server themselves, but it's likely they won't think to do that if or even know how if their only experience with birdseye is through this plugin (which will hopefully be the case sometimes). Plus this plugin is meant to make using birdseye as convenient as possible. Finally, birdseye should hopefully be usable by complete beginners to programming to help them learn, and for them any usability problem such as asking them to start a server is significantly magnified. |
I don't think it's likely that a user would open vscode's birdseye in a browser. If they are using the VSCode extension they would look at the preview. Using a birdseye extension for vscode would be kind of pointless if you did not use vscode. I've opened a FAQ issue (see #9) in case users do run into this. |
If birdseye is running outside of the extension, it fails to start because the port is already taken.
The text was updated successfully, but these errors were encountered: