raspberry ssh_通过SSH到Raspberry Pi的Visual Studio Code远程开发很麻烦

raspberry ssh_通过SSH到Raspberry Pi的Visual Studio Code远程开发很麻烦

raspberry ssh

There's been a lot of folks, myself included, who have tried to install VS Code on the Raspberry Pi. In fact, there's a lovely process for this now. However, we have to ask ourselves is a Raspberry Pi really powerful enough to be running a full development environment and the app being debugged? Perhaps, but maybe this is a job for remote debugging. That means installing Visual Studio Code locally on my Windows or Mac machine, then having Visual Studio code install its headless server component (for ARM7) on the Pi.

有很多人,包括我自己在内,都试图在Raspberry Pi上安装VS Code 。 实际上,现在有一个可爱的过程。 但是,我们不得不问自己, Raspberry Pi是否真的强大到足以运行完整的开发环境以及正在调试的应用程序? 也许,但是也许这是远程调试的工作。 这意味着在我的Windows或Mac计算机上本地安装Visual Studio Code,然后让Visual Studio Code在Pi上安装其无头服务器组件(对于ARM7)。

In January I blogged about Remote Debugging with VS Code on a Raspberry Pi using .NET Core on ARM. It was, and is, a little hacked together with SSH and wishes. Let's set up a proper VS Code Remote environment so I can be productive on a Pi while still enjoying my main laptop's abilities.

在1月,我写了一篇关于在Raspberry Pi上使用.NET Core在ARM上使用VS Code进行远程调试的博客。 它过去和现在都与SSH和愿望一起被黑了。 让我们设置一个合适的VS Code Remote环境,这样我就可以在Pi上高效工作,同时仍然可以享受笔记本电脑的主要功能。

From within VS Code Insiders, hit Ctrl/CMD+P and type "Remote-SSH" for some of the choices.

在VS Code Insiders中,按Ctrl / CMD + P并输入“ Remote-SSH”进行某些选择。

raspberry ssh_通过SSH到Raspberry Pi的Visual Studio Code远程开发很麻烦

I can connect to Host and VS Code will SSH into the PI and install the VS Code server components in ~./vscode-server-insiders and then connect to them. It will take a minute as its downloading a 25 meg GZip and unzipping it into this temp folder. You'll know you're connected when you see this green badge as seen below that says "SSH: hostname."

我可以连接到主机,并且VS Code将通过SSH进入PI,并在〜。/ vscode-server-insiders中安装VS Code服务器组件,然后连接到它们。 下载25兆的GZip并将其解压缩到此临时文件夹将需要一分钟。 当您看到如下所示的绿色徽标“ SSH:主机名”时,就会知道您已连接。

raspberry ssh_通过SSH到Raspberry Pi的Visual Studio Code远程开发很麻烦

Then when you go "File | Open Folder" from the main menu, you'll get the remote system's files! You are working and editing locally on remote files.

然后,当您从主菜单转到“文件|打开文件夹”时,将获得远程系统的文件! 您正在本地处理和编辑远程文件。

raspberry ssh_通过SSH到Raspberry Pi的Visual Studio Code远程开发很麻烦

Note here that some of the extensions are NOT installed locally! The Python language services (using Jedi) are running remotely on the Raspberry Pi, so when I get intellisense, I'm getting it remoted from the actual machine I'm developing on, not a guess from my local box.

注意这里有些扩展不是本地安装的! Python语言服务(使用Jedi)在Raspberry Pi上远程运行,因此,当我获得智能感知时,就可以将其从正在开发的实际计算机上远程获得,而不必从本地机器上进行猜测。

raspberry ssh_通过SSH到Raspberry Pi的Visual Studio Code远程开发很麻烦

When I open a Terminal with Ctrl+~, see that I'm automatically getting a remote terminal and I've even running htop in it!

当我使用Ctrl +〜打开终端时,看到我正在自动获取一个远程终端,甚至在其中运行htop!

Check this out, I'm doing a remote interactive debugging session against CrowPi samples running on the Raspberry Pi (in Python 2) remotely from VS Code on my Windows 10 machine! I did need to make one change to the remote settings as it was defaulting to Python3 and I wanted to use Python2 for these samples.

检查一下,我正在对Windows 10计算机上的VS Code远程运行在Raspberry Pi(在Python 2中)上运行的CrowPi示例进行远程交互式调试会话! 我确实需要对远程设置进行一次更改,因为它默认为Python3,并且我想对这些示例使用Python2。

raspberry ssh_通过SSH到Raspberry Pi的Visual Studio Code远程开发很麻烦

This has been a very smooth process and I remain super impressed with the VS Remote Development experience. I'll be looking at containers, and remote WSL debugging soon as well. Next step is to try C#, remotely, which will mean making sure the C# OmniSharp Extension works on ARM and remotely.

这是一个非常顺利的过程,我对VS远程开发的经验印象深刻。 我将研究容器,以及远程WSL调试。 下一步是尝试C#,远程,这将意味着确保了C#OmniSharp扩建工程ARM远程。



Sponsor: Suffering from a lack of clarity around software bugs? Give your customers the experience they deserve and expect with error monitoring from Raygun.com. Installs in minutes, try it today!

发起人:是否对软件错误缺乏明确的了解? 通过Raygun.com进行错误监视,为您的客户提供应有的期望和期望的体验。 几分钟即可安装,立即尝试!

关于斯科特 (About Scott)

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

斯科特·汉塞尔曼(Scott Hanselman)是前教授,前金融首席架构师,现在是演讲者,顾问,父亲,糖尿病患者和Microsoft员工。 他是一位失败的单口相声漫画家,一个玉米种植者和一本书的作者。

raspberry ssh_通过SSH到Raspberry Pi的Visual Studio Code远程开发很麻烦
raspberry ssh_通过SSH到Raspberry Pi的Visual Studio Code远程开发很麻烦
raspberry ssh_通过SSH到Raspberry Pi的Visual Studio Code远程开发很麻烦
About   关于 Newsletter 时事通讯
Hosting By 主持人
raspberry ssh_通过SSH到Raspberry Pi的Visual Studio Code远程开发很麻烦

翻译自: https://www.hanselman.com/blog/visual-studio-code-remote-development-over-ssh-to-a-raspberry-pi-is-butter

raspberry ssh