vs code 无法打开stdio.h_在服务器上搭建VS-Code并在ipad上用浏览器编程

5bb5c8aa859587b7e202c0b3280c89c5.png

前几天看到vs code有了web版,打算注册弄一个。但是怎么注册都没注册上。然后使用搜索引擎打法,发现了一个开源项目,可以在自己的服务器上搭建web版的VS-Code。接下来,我们开始吧!

项目的地址:code-server

官方给了三种部署的方式,我使用的是包部署。

首先我们要去下载这个二进制文件。

下载地址:https://github.com/cdr/code-server/releases

也可以在服务器上使用一下命令:

wget https://github.com/cdr/code-server/releases/download/2.1692-vsc1.39.2/code-server2.1692-vsc1.39.2-linux-x86_64.tar.gz

解压这个压缩包:

tar xzvf code-server2.1692-vsc1.39.2-linux-x86_64.tar.gz

进入压缩包:

cd code-server2.1692-vsc1.39.2-linux-x86_64

运行二进制文件:

./code-server

安装成功:

333bbe5a59c97e8b29900aa8e51db110.png

访问服务器:

http://127.0.0.1:8080

输入密码:

38b3c540e81653bf0a638451a2d36484.png

46e8d467b9d519b4a0ed938a34079487.png

安装插件,和客户端的方式相同。

更多玩法:

Usage: code-server [options][paths...]

Options
  --locale <locale>              The locale to use (e.g. en-US or zh-TW).
  --user-data-dir <dir>          Specifies the directory that user data is kept in. Can be used to open multiple distinct instances of Code.
  -v --version                   Print version.
  -h --help                      Print usage.
  --telemetry                    Shows all telemetry events which VS code collects.
  --extra-builtin-extensions-dir Path to an extra builtin extension directory.
  --extra-extensions-dir         Path to an extra user extension directory.
  --base-path                    Base path of the URL at which code-server is hosted (used for login redirects).
  --cert                         Path to certificate. If the path is omitted, both this and --cert-key will be generated.
  --cert-key                     Path to the certificate's key if one was provided.
  --format                       Format for the version. Allowed value is 'json'.
  --host                         Host for the server.
  --auth                         The type of authentication to use. Allowed values are 'password', 'none'.
  --open                         Open in the browser on startup.
  --port                         Port for the main server.
  --socket                       Listen on a socket instead of host:port.

Extensions Management
  --extensions-dir <dir>                            Set the root path for extensions.
  --list-extensions                                 List the installed extensions.
  --show-versions                                   Show versions of installed extensions, when using --list-extension.
  --category                                        Filters installed extensions by provided category, when using --list-extension.
  --install-extension <extension-id | path-to-vsix> Installs or updates the extension. Use `--force` argument to avoid prompts.
  --uninstall-extension <extension-id>              Uninstalls an extension.
  --enable-proposed-api <extension-id>              Enables proposed API features for extensions. Can receive one or more extension IDs to enable
                                                    individually.

Troubleshooting
  --verbose                          Print verbose output (implies --wait).
  --log <level>                      Log level to use. Default is 'info'. Allowed values are 'critical', 'error', 'warn', 'info', 'debug', 'trace', 'off'.
  -s --status                        Print process usage and diagnostics information.
  --disable-extensions               Disable all installed extensions.
  --disable-extension <extension-id> Disable an extension.
  --max-memory                       Max memory size for a window (in Mbytes).

这样就可以在Ipad上写点简单的程序了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值