Try customizing Dynamics 365 Business Central in Browser??? (code-server: VS Code in the browser)

Dynamics 365 Business Central

Hi, Readers.
Today I want to continue to discuss whether it’s possible to customize Dynamics 365 Business Central in browser. I tried Visual Studio Codespaces last month, but failed. Because the AL command cannot be used in Visual Studio Codespaces.
For Details: Try customizing Dynamics 365 Business Central in Browser??? (Visual Studio Codespaces)

In this post, I will try another method, code-server.

Let me jump to the conclusion first. This time I also successfully ran Visual Studio Code in the browser. But unfortunately, like last time, the AL Language does not support browser well. /(ㄒoㄒ)/~~
Test video: Apparently iPhone is not designed for programming

README.md (code-server)

code-server:
Run VS Code on any machine anywhere and access it in the browser.

Highlights:

  • Code on any device with a consistent development environment
  • Use cloud servers to speed up tests, compilations, downloads, and more
  • Preserve battery life when you’re on the go; all intensive tasks run on your server

Getting Started

There are two ways to get started:

  1. Using the install script, which automates most of the process. The script uses the system package manager (if possible)
  2. Manually installing code-server; see Installation for instructions applicable to most use cases

If you choose to use the install script, you can preview what occurs during the install process:

curl -fsSL https://code-server.dev/install.sh | sh -s -- --dry-run

To install, run:

curl -fsSL https://code-server.dev/install.sh | sh

When done, the install script prints out instructions for running and starting code-server.

We also have an in-depth setup and configuration guide.

Cloud Program

We’re working on a cloud platform that makes deploying and managing code-server easier. Consider running code-server with the beta flag --link if you don’t want to worry about

  • TLS
  • Authentication
  • Port Forwarding
$ code-server --link
Proxying code-server to Coder Cloud, you can access your IDE at https://valmar-jon.cdr.co

Operating System

Note: You can install code-server for Linux, macOS and FreeBSD. As of now, it cannot be installed on Windows OS.

yzhu@W1004408N201 MINGW64 ~
$ curl -fsSL https://code-server.dev/install.sh | sh
Unsupported OS MINGW64_NT-10.0-18362.

I don’t have any macOS device, so I tried to install Linux in my Hyper-V.

Looks OK.

Then install Visual Studio Code in Linux.

Install AL Language extension.

Unfortunately, I cannot get the AL Language Extension to work properly in Linux. I can only find AL: Go!, AL: Open Events Recorder, and AL: Open Externally in the Ctrl + Shift + P menu.

After the investigation, I found that currently AL Language only supports windows OS………. But I don’t want to give up, let me continue.

Install code-server in Linux

1. Run sudo apt install curl in Termianl.

2. Manually installing code-server
Copy following code and paste it to Terminal in your local Visual Studio Code.

curl -fsSL https://code-server.dev/install.sh | sh

Completed.

3. Run following command.

sudo systemctl enable --now code-server@$USER

4. Now I can visit http://127.0.0.1:8080. And my password is in ~/.config/code-server/config.yaml.

PS: You can change the default password, but you must run code-server command after changing.

Now I can successfully open Visual Studio Code in the Linux browser.

I can open the AL files.

But I can not find AL Language extension in the Browser. Emmm….

Only for test, I try to install C# on Remote.

It worked well.

If you want to access it on the Host PC, you need to modify the IP address in ~/.config/code-server/config.yaml.
First, use IP command to find the IP address of Linux server.
For example: 172.17.79.171

Then modify the IP address, and run code-server command

Completed.

Now I can visit http://172.17.79.171:8080 in my host PC.

Test Video:

Because I am using a virtual machine, devices on the same network cannot directly access it.
So I executed the netsh command.
For example:
netsh interface portproxy add v4tov4 listenport=14018 listenaddress=192.168.2.132 connectaddress=172.17.79.171 connectport=8080

Now I can visit http://192.168.2.132:14018 from other devices.
For example: In my iphone.

Test Video:

PS: You can also put the site on the internet so that you can access Visual Studio Code from anywhere using any device.

END

This is just an interesting test, hope this will help.

Thanks for your reading.

ZHU

コメント

タイトルとURLをコピーしました