3 ms·
there is zero benefit. windows can now access wsl files. also, you can setup visual studio code to run bash in an integrated terminal and thus call command line
by nikofeyn 8y ago
there is zero benefit. windows can now access wsl files. also, you can setup visual studio code to run bash in an integrated terminal and thus call command line application in the wsl. also, using "wsl.exe <name>", you can call a wsl application from cmd or powershell.
- shawnz 8y agoBut you can't, for example, tell a Windows instance of VS Code to use the WSL Python binary for debugging Python applications. It will run the binary just fine, but it won't know to translate the Windows file paths into WSL ones. So you will just get a file not found error any time you try to use it.
- nikofeyn 8y agothat's not true. i use visual studio code and emacs, both on windows, to develop scheme that runs on wsl (since many schemes don't support windows). in visual studio, i use bash in the integrated terminal which takes care of running the binaries on wsl, and in emacs, i update my user init file to use "wsl.exe scheme" for the scheme application, where "scheme" is in my wsl path. launching a repl works just fine, and it's able to load files without issue. what path translation are you talking about? if there's an actually a problem with something you've tried, then it is probably a problem with python and not the setup. as i said, i regularly do what i mentioned above with no issues. wsl can see both files local to it and on the windows system.
- shawnz 8y agoI didn't say you can't run a REPL in the terminal. Actually I said you can do that. What you can't do is use the VS Code debugger. You also can't: get code autocompletion, linting, automatic refactoring like renaming variables, you can't run files by right clicking and clicking "run", etc.
- nikofeyn 8y agoahh, sorry. that wasn't clear because i haven't used the python debugger in visual studio code and don't use python in general. i would guess my hunch that this is a python problem is correct. i use ionide for f#. i am wondering if i point ionide (if it's possible) to use f# running on ubuntu through wsl, will its type inference, linting, autocompletion, etc. still work?
- shawnz 8y agoIt's not a python problem. Like I said, when you initiate a debug session, VS code will launch the python binary just fine, but it passes it the Windows path of the file you're debugging which obviously the WSL python binary can not understand. I assume F# on WSL would have the same issue, although I haven't tried personally. Here you can see a bug report for the issue: https://github.com/Microsoft/vscode-python/issues/67 https://github.com/Microsoft/vscode-python/issues/67 And the same issue for other languages: https://github.com/Microsoft/vscode/issues/22663 https://github.com/Microsoft/vscode/issues/22663 https://github.com/Microsoft/vscode-go/issues/926 https://github.com/Microsoft/vscode-go/issues/926 Looks like they've implemented fixes for C++ and nodejs though: https://github.com/Microsoft/vscode-cpptools/issues/85#issuecomment-277128833 https://github.com/Microsoft/vscode-cpptools/issues/85#issue... https://github.com/Microsoft/vscode/issues/39144#issuecomment-347310763 https://github.com/Microsoft/vscode/issues/39144#issuecommen...