简体   繁体   English

在VSCODE中通过CMDER使用WSL

[英]Using WSL through CMDER in VSCODE

I have setup WSL in CMDER through settings->Startup->{WSL::bash} and also made it my default shell, so whenever I open CMDER it starts in WSL. 我已经通过settings->Startup->{WSL::bash}在CMDER中设置了WSL,并将其settings->Startup->{WSL::bash}为我的默认shell,因此每当我打开CMDER时,它都会在WSL中启动。

I integrated CMDER into VSCODE using https://github.com/cmderdev/cmder/wiki/Seamless-VS-Code-Integration and it is working. 我使用https://github.com/cmderdev/cmder/wiki/Seamless-VS-Code-Integration将CMDER集成到VSCODE中,它正在运行。 But the CMDER version opening inside VSCODE is not the default WSL shell. 但是在VSCODE中打开的CMDER版本不是默认的WSL shell。

How can I setup CMDER with WSL as shell, inside VSCODE? 如何在VSCODE内部使用WSL作为shell设置CMDER?

I found the solution, I got the WSL shell with CMDER in VSCODE by adding the following in settings. 我找到了解决方案,通过在设置中添加以下内容,我在VSCODE中获得了带有CMDER的WSL shell。

{
 "terminal.integrated.shell.windows": "path\\to\\cmder\\vendor\\conemu-maximus5\\ConEmu\\wsl\\wslbridge.exe"
}

CMDER tab shows wslbridge.exe when I open WSL shell in CMDER. CMDER标签显示wslbridge.exe当我打开CMDER WSL壳。 So I searched for wslbridge.exe inside CMDER folder and added the path in VSCODE settings and it worked. 所以我在CMDER文件夹中搜索了wslbridge.exe并在VSCODE设置中添加了路径并且它有效。

I am not sure if this is the perfect solution or if this causes any issues in the future but it works for now. 我不确定这是否是完美的解决方案,或者这是否会导致未来出现任何问题,但现在仍然有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM