docs/VSCODE_DEVELOPMENT.md
Visual Studio Code is a great and simple IDE that can be used to build & develop with for Matter.
Matter supports the docker / remote container workflow in Visual Studio Code, and has a container environment setup automatically. You can read more about this workflow here.
Tested on:
git config --global core.autocrlf false"terminal.integrated.shell.windows": "C:\\Windows\\System32\\bash.exe"Located in the tasks json file you'll find a list of tasks that can be run from the "Run Task..." command. Example tasks are "Clean", "Run Pretty Check"
Developers are encouraged to add tasks to the tasks json over time to make sure everyone is using the same base configuration and build.
Located in the launch json file you'll find a list of build & run jobs that can be run from the "Run" tab and start a run or debug session.
Developers are encouraged to add tasks to the launch json over time to make sure everyone is using the same base debugging setup.
A common problem encountered is that a container can't resolve
archive.ubuntu.com and can't install anything via apt-get, during the
creation of the container image, resulting in an error like:
E: Package 'locales' has no installation candidate
The command '/bin/sh -c apt-get install -y locales && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8' returned a non-zero code: 100
Most common reason for this is that the DNS for docker daemon has not been set
up correctly and is simply using a default: 8.8.8.8, which in many corporate or
more secure environments is not accessible. A typical solution for this is to
put a following key/value into your system-wide docker daemon.json (Typically
located under /etc/docker/daemon.json on a Linux system):
"dns": ["<<IP ADDRESS OF YOUR NAMESERVER>>", "8.8.8.8"]
You can obtain the address you should put into that line of your nameserver by running:
nmcli dev show | grep 'IP4.DNS'
After you update the dns, you should restart docker, specific to your system. On a typical Linux workstation, you do this via:
sudo service docker restart
Alternatively, you can also pass the --dns argument to your docker daemon, but
creating a daemon.json and following the above method will solve the problem
system-wide.
"editor.formatOnSave": true@ext:xaver.clang-format, it is
installed in the docker container. Make sure all languages are enabled