-
Notifications
You must be signed in to change notification settings - Fork 512
Remote editing only works for .ps1 files but not others #2166
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
Comments
@OnurGumus thanks for opening this issue...It would be really helpful if you could also attach the logs--instructions for how to do that are here , please also provide repro steps, as well as a detailed description of the behavior you are experiencing...thanks! |
@SydneyhSmith all repo steps has been clearly stated in the opening issue. If you actually spend 2 minutes and read what I wrote, you will understand the problem. I am not intended to provide further info regarding how to reproduce and loggings as the issue and repro steps are crystal clear. |
@OnurGumus I just followed the steps, and the file saves as expected. after I added a line in the editor: We need the logs because something might be specific to your system. Please provide those and also what OS's you're using. Also, do you have access to the file you're trying to save? |
@TylerLeonhardt, if you read the issue carefully, it clearly states both server and client are windows machines. In your case you are using Linux. To be specific client is latest windows 10 pro rtm X64 and server is windows server 2019 standard edition 1809. I am creating the file with new item. Saving only works when the extension is ps1. Also you use a different command than the linked tutorial as new-editor-file whereas I am using psedit, not sure if it makes any difference. |
I will provide the logs once I have access to my computer. |
Missed the part about Windows. My bad. Just for future reference, we have an issue template so that we don't miss these details the first time around. It just streamlines the process.
I still need to know - what communication protocol are you using? ssh or winrm? |
It's winrm. I agree that my writing style makes those details less visible. But I thought your template was really overwhelming since it was easy to repro from my point of view. |
@OnurGumus we will try to stand up an environment similar to yours and repro this...in the meantime it would still be helpful to see your logs--thanks! |
Hi, I'm having the same issue from Windows 10 PC to Windows Server My prompt and logs attached
1568362690-2cf65ee5-9dce-4f0e-b10e-421124476b0e1568360608478.zip |
This issue is being closed as inactive, if this issue is still occurring it will be re-opened |
@SydneyhSmith I'm still having this issue. Let me know if you need any further information |
Faced the same issue today (Windows 10 with Powershell 5). |
@SydneyhSmith may I ask why you remove Needs:Attention? |
I use this to record gifs, although I think some other contributors have something better that records keyboard input. Alternately, I think Alt+Shift+R will record the screen on Windows, but you'll then have to convert it from mp4 to gif if you want to upload it directly to a GitHub comment. Looking again at your logs, the path to the temp file seems like it's only got ASCII characters in it, so URI issue seems less likely. I also thought it could be a permissions issue with the temp directory used for local files, but that wouldn't account for ps1 files working. I'll see if I can dig through the codebase to find something that might explain the symptoms. |
@rjmholt I've attached a gif of trying (I've also double checked that running |
That path has a negative number... very curious... that gif is SUPER helpful, thanks @centreboard!! |
Reading the previous logs though, that doesn't seem to be a common factor |
@centreboard after you save the file the first time in VS Code, can you |
I'm also still wondering why VSCode wouldn't send us a didSave notification. Given that @centreboard is on 1.41.1, it seems unlikely that it's a bug in that VSCode version. It could be a configuration thing maybe, so maybe we should take a look at the configuration settings? Otherwise, it might be worth seeing if we can trace a save in VSCode. That should be possible by starting VSCode with trace logging and inspecting the logs here. From there we'd expect to see log entries beginning with |
@TylerLeonhardt I can confirm that |
The VSCode logs I was hoping for aren't in that zip it seems. Their documentation on logging might be lacking. I'm going to try firing up an RS3 VM to see if I can get a reproduction in a more faithful environment. |
Ok I haven't been able to reproduce remoting from:
to:
At this point, if I find time, I'll see if I can read through the code and see where code paths for PS and non-PS files diverge for some clues. |
I am having this same issue. It also appears the autocomplete is unaware that I am in a remote session and continually autocompletes to the folder I was previously in before entering a remote session. I am on the latest version of VSCode and the powershell extension. My system uses Powershell 5.1. I am using WinRM with Enter-PSSession cmdlet. Client: Server: My initial though after reading through this thread: Perhaps the extension is only receiving saveFile notifications on file extensions associated with the powershell vscode extension (ps1, psm1, psd1, etc)? |
That's what it seemed to look like in #2166 (comment). However if the file you're seeing in #2166 (comment) is up to date, then that suggests that the save notification isn't the issue. Instead, it may occur somewhere around here. |
I think some important factors in this so far are:
|
This issue was closed automatically as repro info was indicated as needed, but there has been no activity in over a week. Please feel free to reopen with any available information! |
This seems like it actually did have repro info (and indeed, is a very long issue). Re-opening and removing that label. |
Any news on this bug? It's really annoying to rename every file to This get's more important every day, since PowerShell ISE is deprecated and the PowerShell VS Code extension is advertised as a fully featured replacement! |
For what it's worth, I think the problem likely lies right here: https://github.com/PowerShell/PowerShellEditorServices/blob/af34540acb65a8b1b0e86110436e326fe46ea91d/src/PowerShellEditorServices/Services/TextDocument/Handlers/TextDocumentHandler.cs#L131 Since the |
When I follow this documentation
https://docs.microsoft.com/en-us/powershell/scripting/components/vscode/using-vscode-for-remote-editing-and-debugging?view=powershell-6
I noticed remote editing only works for .ps1 files. For other extensions, you can save the file but it won't sync back to the server. I am using PowerShell v7 preview 3 for both host and server and both host and server are windows machines along with Latest VSCode and Powershell extension
A relevant issue has been earlier reported but closed:
#1040
The text was updated successfully, but these errors were encountered: