gpt4 book ai didi

node.js - 使用哪个 IDE 在 Raspberry Pi 上开发 NodeJS 应用程序?

转载 作者:太空宇宙 更新时间:2023-11-03 23:30:20 25 4
gpt4 key购买 nike

我对 Node JS 还很陌生。我想在 Raspberry Pi 3 上开发一个 Node JS 应用程序。该应用程序将与连接到 Raspberry Pi GPIO 引脚的传感器进行交互。我可以在 RPi 上使用什么 IDE 进行编码和调试?

最佳答案

我也是 NodeJS 新手,但这是我目前的设置:

  1. 我使用 Windows 计算机和 Visual Studio 2015 Community Edition 来编写和调试代码。
  2. 已安装适用于 Visual Studio 的 Node.js 工具:https://beta.visualstudio.com/vs/node-js/
  3. 在 Raspberry PI 上安装了 Samba,用于与 Windows 计算机共享文件: http://blogs.arcsoftwareconsultancy.com/pi/2013/03/07/windows-networking/
  4. 我将 Raspberry 上 NodeJS 应用程序的源代码保存在 Samba 共享文件夹中。
  5. 我将 RemoteDebug.js 添加到应用程序的根文件夹中。您可以通过转到 Visual Studio 2015 的以下菜单来找到计算机上的 RemoteDebug.js:工具->Node.js 工具->远程调试代理->打开包含文件夹
  6. 为了进行调试,我使用以下命令在 Raspberry 上启动应用程序:

    sudo node RemoteDebug.js server.js

  7. 然后,我通过 VS 中的“附加到进程”对话框附加到在 PI 上运行的 Node 进程(您需要从“传输”下拉列表中选择 Node.js 远程调试): enter image description here

关于node.js - 使用哪个 IDE 在 Raspberry Pi 上开发 NodeJS 应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39071885/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com