Open richardnm-2 opened 1 year ago
Hi,
Interesting, I don't se why we shouldn't support this!
I haven't used WSL2 myself, I'll download it and give it a try, but any help in both testing & implementing this would be greatly appreciated! I'm going to put together a contributing.md document in the coming days, with some info on how to run/debug the extension.
It seems the extension is installed on the WSL2 VM, which means we cannot share any files between the extension/unreal. All communication needs to happen through the socket.
There are currently some python scripts that the extension refers to by filepath (see src/modules/remote-handler::executeFile).
These python files will instead need to be read inside this executeFile
method, and then pass along the code instead of the filepath.
Then comes the issue of vscode_execute_entry.py which does a relative import of vscode_execute.py. Worst case we could skip this and execute vscode_execute.py directly (only incase of WSL2).
Lastly, instead of passing in the filepath (fileToExecute
) in src/scripts/execute::main, this file also needs to be read here and passed as code.
There is now a CONTRIBUTING.md with some info on how to setup the extension for development/debugging.
It will probably be some time before I have the time to look at this, but feel free to give it a go if you're feeling up to it.
Cheers, Nils
Would it be possible to implement remote code execution from WSL2 as well? I've never worked with VSCode extensions, maybe with some guidance I can help implement it.
EDIT: I've been able to connect to the Windows UE5 instance from WSL2, changing TTL to 2 in the plugin and extension settings. Even so, when I try to run a script file, the UE5 output log displays:
It seems that it has the root for file execution on Windows, trying to access the WSL Ubuntu
/home/...
directory.