-
Notifications
You must be signed in to change notification settings - Fork 40
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
Can't change remoteHost once set #588
Comments
We definitely need some improvements in this area. Our ultimate goal is to implement a proper "Default/Active Device" feature (outlined in #506). But to your specific point right now, I believe that value will change if you sideload to a different device. If I remember correctly, it will always overwrite the value with whatever device was most recently sideloaded to. |
That feature sounds great. In my use case I'm not sideloading so the value is never overwritten, but I see your point :) |
Until we get the time to properly implement #506, would you be interested in submitting a PR that adds a menu option to the device list that would switch that internal value. Something like this, with maybe a title like "Set as active device": I think you'd need to add a new entry in that devices list here:
And then add the command in https://github.com/rokucommunity/vscode-brightscript-language/blob/master/src/BrightScriptCommands.ts that would set the value like we do here |
I'll take a look and see what I can do. |
Trying to setup a build environment using
And getting a 404 :(
Right, I followed the manual approach and got everything installed (as a FYI there is a type in the manual instructions, I've updated code, build seems to complete successfully, but then what, I was kind of expecting a .vsix file to be created. |
Next:
|
Okay, getting further :) In the second VSCode running the BRS extension is showing but after a while it gives the following error: Any ideas? |
Does it give you a stack trace? You can find that in the debug panel of the non [extension host] window. Does it happen with the code directly from master or was this an issue introduced by your new code? |
I thought much the same so I did revert the code, but behaves the same Debug Console
|
I'm not really sure what's going on then. Let's try starting over. The
Then open the folder with vscode, and in the menu at the top click "Run" -> "Start Debugging" start debugging. It'll run a few build tasks automatically, then it will launch the [Extension Host]. |
Behaved exactly the same. Thought maybe it was a windows thing so tried again in Linux and got this error again when I tried the
|
@triwav this looks like it might be an issue with rta. Any thoughts on why it's failing to install? |
@spoyser it appears that you're using
|
Ah yes I see that, although that is only on the Linux environment. Still doesn't explain the issue I'm seeing on Windows (I assume it should work on Windows?): |
Hey @spoyser I think I found the issue and resolved it. I have no idea why this issue was happening only sometimes, but it started happening randomly to me today so I was able to fix it and then ensure it was resolved. Can you pull latest from the repo and try again? Also, thank you so much for your patience. |
@TwitchBronBron |
All done, I added a clear active device for a particular use case of mine too. |
I’ve been thinking about this a bit more and IMO the remoteHost setting in the settings file should be removed. There is no benefit to setting it except for the very first use, where it would save you have to enter it in the input box. But once the value is in the VSCode database this setting has zero effect and in fact is just confusing because it has no effect. I think it should be removed and the code always prompt for the value if it is currently not set in the database, this works well in conjunction with the clearActiveHost command I added (which can easily be bound to a key-press). In which case maybe active host should be renamed to remote host. Let me know what you think. |
I mostly agree with you. However, I'm hesitant to remove it, just for legacy purposes at the moment. I think once we get into actually implementing #506 , we can eliminate the setting then. |
It would seem that once the IP of the Roku device to which you want to send remote keypresses to is set, it is then impossible to update it.
This is due to the value being stored as a memento (
remoteHost
) in the workspace database (stored instate.vscdb
), and once set the functiongetRemoteHost
will always use that value regardless of the settings parameter (e.g."brightscript.remoteControl.host":"11.23.56.90"
)Using SQLite browser it is possible to update the value, and this new value is then used by the extension.
e.g.
{"rokuAutomationAutorunOnDeploy":true,"rokuAutomationConfigs":"{\"configs\":[{\"name\":\"DEFAULT\",\"s0teps\":[]}]}","remoteHost":"11.23.56.90","rokuAppOverlays":[]}
Perhaps a solution would be to always use the value from the VSCode settings, and if the value is
${promptForHost}
show the input and then overwrite the setting with whatever the user entered?The text was updated successfully, but these errors were encountered: