How to run a Visual Studio Code compiled/minified Web build in the browser - visual-studio-code

I am able to run VS Code development mode in my browser by installing the required packages and running a few commands, but I failed to build a compiled and minified version and run the same in browser.
I am able to run VS Code web development mode in the browser on Ubuntu 20.04 with the following commands:
sudo apt-get install build-essential g++ libx11-dev libxkbfile-dev libsecret-1-dev
yarn
yarn watch
./scripts/code-web.sh
I'm able to build with the following command, but am missing instructions on how to run a compiled version of VS Code Web in browser.
yarn gulp vscode-web-min
Can anyone tell me how to or point me to the right documentation?

Recently I came across the same question. I found this repo https://github.com/Felx-B/vscode-web which perfectly answers your question. This is not a fork of vscode, but rather a set of helper scripts in order to build vscode web edition.
You should clone this repository and run the following commands in order to build vscode-web.
$ yarn build
$ yarn prepare-demo
$ yarn demo
Open http://localhost:8080 and you'll see the web version running in your browser. It is limited in features compared to the native or server version. Terminal is disabled and files are served from in-browser file system.

Related

Visual Studio Code / Debugger / Raspberry PI Unable to start debugger

I'm getting this error message from Visual Studio Code when I attempt to run remote debugging (see large screenshot below)
I know this is a version mismatch - but with Visual Studio on 7.0.2, the PI latest version is 6.0.405.
From this screenshot, its saying that version 7.0.2 is not installed - but that version (as far as I know and I've tried) is not available
I'm new to PI development, and I've researched this extensively. I'm looking for what I'm clearly I am clearly missing to sync up the two versions and get the debugger to attach to a program running on the PI (which is running fine)
I have the environmental variable for DOTNET_ROOT set correctly, with the latest PI installation, and debugger installed as well
Don't use the dotnet-install script, that is for CI (continuous integration) only. To install dotnet on the Raspberry Pi, go to https://aka.ms/dotnet-download and download the binaries(!) for version 7.0.2 for Arm64 (assuming you already have the 64 bit version of Raspberry Pi OS installed).
The instructions on the download page will install the runtime only for the current user. I would recommend to install it globally (there's typically only one user on a Raspberry Pi, anyway). To do so, run these commands:
sudo mkdir /usr/share/dotnet
sudo tar zxf dotnet-sdk-7.0.102-linux-arm64.tar.gz -C /usr/share/dotnet
sudo ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
(setting DOTNET_ROOT is not necessary)
to verify proper installation, run
dotnet --info
When a new version becomes available (or you also need to install version 6.0 in parallel), just extract the package to the same directory. They can install side-by-side.

Issues with setting up Ionic for Moodle mobile app development

Issue:
I am currently experiencing issues with getting Ionic set up for Moodle mobile app development.
What have I tried?
I am currently following the Moodle documentation.
However, when I run the command npm run setup I get the warning:
npm WARN tarball tarball data for mathjax#2.7.7 (sha512-OOl0B2/0tSJAtAZarXnQuLDBLgTNRqiI9VqHTQzPsxf4okT2iIpDrvaklK9x2QEMD1sDj4yRn11Ygci41DxMAQ==) seems to be corrupted. Trying one more time.`
It takes really long to extract on the retry.
copy of the issue.
Same problem. Only having this issue on my windows install though. Not a problem on linux.
It freezes on that tarball. To get past it I did the following in moodleapp directory:
npm cache clean --force
npm install mathjax#3
npm run setup
...will see how the rest of the environment setup goes.

How to install and run Theia, browser based IDE?

I want to develop remotely and read about Theia. I could install the program with pip
pip install theia
But then there is no description available on how to start the program. Is it plug-in for Eclipse, or do I have to run it in docker or what?
Theia is not an extension of the classic Eclipse project. This is not really an installable app.
If you want to run Theia locally, you can follow the tutorial of the official documentation : Official help to setup environement.
Be sure to have Node.js 10 installed. It is not currently compatible with Node.js 12. If you want to have more than one version of Node installed on you machine, I advise you nvm (nvm github) or nvm-windows (nvm windows github).
If it can be useful, I personnally have a small bat script to launch Theia at the manner of a desktop app
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --app=http://localhost:3000
yarn start

Unable to use angular cli in eclipse

It says I have used the pro version so I need the licence or free trial.How can I get the free version of angular cli on eclipse.I have tried to reinstall it but did not work.
As far as I know, Eclipse does not support Angular CLI. Try taking a look at IntelliJ's trial version. (https://www.jetbrains.com/idea/)
You don't need an IDE to use Angular CLI. All you need is a Terminal.
Run the following steps:
You need Nodejs. If you don't have it yet, just go this official
nodejs page & download the recommended version then install it.
$ npm install -g #angular/cli
Angular Eclipse is open source and integrates angular-cli with Terminal, Wizards and Launches.

Eclipse - Docker integration

I'm looking for a way to integrate Docker containers with the Eclipse platform.
I would like to run all build/test/debug command inside containers and use same containers in Continuous Integration build and later in production.
The simplest way I looked on, was just to configure custom command but besides permissions problem (docker must run as sudo/root) it doesn't give me all the flexibility of real integration.
Any ideas on the best way to proceed?
it is not a full answer to your question but we (JBoss Tools team) started working on this and here are a few blogs about what is possible todo today and where we are with Eclipse docker tooling.
http://tools.jboss.org/blog/2015-03-02-getting-started-with-docker-and-wildfly.html
http://tools.jboss.org/blog/2015-03-03-docker-and-wildfly-2.html
http://tools.jboss.org/blog/2015-03-30-Eclipse_Docker_Tooling.html
To do that, i think you work on a Linux platform :-)
What i do for a classic java project :
Build a Docker image that contains a jdk and maven for example
In Eclipse, via "Run Configurations", create a "build in Docker" configuration that launch a command like this :
docker run --rm -v <eclipse_workspace_dir>:/usr/src/myapp -w /usr/src/myapp myrepo/myimage mvn clean install
it should work.
For your continuous integration, you can use Docker Jenkins plugin to do the same or with a sh script.
There is Docker Tooling for Eclipse, available from this update site (you also need to add this update site as for now).
Try Eclipse-Che
https://eclipse.org/che/
You can install it as a Docker runs.
These links were very useful to me :
https://github.com/docker/labs/blob/master/developer-tools/java-debugging/Eclipse-README.md
https://github.com/docker/labs/blob/master/developer-tools/java/chapters/ch07-eclipse.adoc
https://docs.docker.com/samples/
It is all about Tutorial: Debugging Java Applications in Docker, Install Docker Tooling in Eclipse
You can also Watch a quick video explaining the key steps in https://www.youtube.com/watch?v=XmhEZiS26os
To configure remote debugging in Eclipse, click on Run > Debug Configurations...
Tomcat for instance supports remote debugging the Java Platform Debugger Architecture (JPDA). Make sure that the remote debugging was enabled when the tomcat image (registration-webserver) was built.