Champ = CH(romebook) A(pache) M(ySQL) P(hp)
The #1 screen recorder for Chrome. Capture, edit and share videos in seconds. Screencastify - Screen Video Recorder. Need help download XAMPP to chromebook hi, i have the google pixelbook. 'chromebook' and i have to download XAMPP it will download but when i try to run it it wont because its not running off windows. Any suggestions? Download and install an easy to use software package called XAMPP in order to simplify the process of running the Apache webserver and MySQL database. We will then download Aptana, an open source Web IDE that comes with code assist/code completion abilities. It will prove invaluable when developing your own web based information systems. In XAMPP, there is an Apache server. Let's see steps to run a PHP program in browser: First, start the XAMPP control panel by clicking on the start button and then find the XAMPP control panel. A fast and simple guide for getting WordPress running locally on a Chromebook using XAMPP. A Chromebook running Crouton/Ubuntu 16.04 in developer mode.
Ch = Chromebook
a = Apache
m = MySQL
p = PHP
Turn your Chromebook into a low cost Apache/PHP/MySQL development machine, run Apache/PHP/MySQL offline, develop LAMP websites offline.
( ok ok, the term Champ is technically wrong, I have used Debian in a chroot environment that is setup by Crouton, so it is still Lamp, but the term Champ is just to good not to use it )
First the Chromebook must be put into developer mode, this can be different for the brand Chromebook you have, for me below actions did work.
- Press + + at the same time
- Press + d
https://www.chromium.org/chromium-os/poking-around-your-chrome-os-device#TOC-Putting-your-Chrome-OS-Device-into-Developer-Mode
Install Debian through Crouton
Download Crouton at https://goo.gl/fd3zc and then activate it with below actions.
- + + t
- shell
- sudo sh ~/Downloads/crouton -r jessie -t cli-extra
Please read more about Crouton at below site, it's a great tool !
https://github.com/dnschneid/crouton/blob/master/README.md
Going into Debian on your Chromebook
After installation you can enter Debian on your Chromebook with below actions
- + + t
- shell
- sudo enter-chroot
I did use below ones, but for sure those version numbers will soon be old ..
- httpd-2.4.16.tar.gz
- mysql-5.6.26.tar.gz
- php-7.0.0RC3.tar.gz
- phpMyAdmin-4.4.14-all-languages.zip
Setup an build environment
- sudo apt-get install gcc g++ make cmake bison zip libaio-dev libapr1-dev libaprutil1-dev libpcre3-dev libxml2-dev libncurses5-dev libmcrypt-dev tidy libtidy-dev
Compile, install & start Apache
First step, the A from Champ, the Apache webserver
- cd ~
- tar zxvf Downloads/httpd-2.4.16.tar.gz
- cd httpd-2.4.16
- ./configure --with-mpm=prefork
- make
- sudo make instal
- sudo /usr/local/apache2/bin/apachectl start
http://localhost
Compile, install, configure & start PHP
PHP is next.
- cd ~
- tar zxvf Downloads/php-7.0.0RC3.tar.gz
- cd php-7.0.0RC3
- ./configure --with-apxs2=/usr/local/apache2/bin/apxs --enable-mbstring --with-mysqli --with-mcrypt --with-tidy
- make
- sudo make install
- sudo pico /usr/local/apache2/conf/httpd.conf
DirectoryIndex index.htmlAnd change it into
DirectoryIndex index.php index.htmlAnd add below lines just after the loading of the PHP 7 module.
Restart apache with below command
SetHandler application/x-httpd-php
- sudo /usr/local/apache2/bin/apachectl restart
- sudo pico /usr/local/apache2/htdocs/phpinfo.php
phpinfo();And got to below url in Chrome
?>
http://localhost/phpinfo.php
Compile, setup and start MySQL
This one will take some time
- cd ~
- tar zxvf ~/Downloads/mysql-5.6.26.tar.gz
- cd mysql-5.6.26
- cmake .
- make
- make install
- cd /usr/local/mysql
- sudo chown -R champ:champ .
- ./scripts/mysql_install_db --user=champ
- chown -R root .
- sudo pico /usr/local/mysql/my.cnf
bind-address=127.0.0.1The first line makes sure that only your local Chromebook can access MySQL.
user=champ
The second line defines the runtime user the MySQL deamon runs under.
- cd /usr/local/mysql
- sudo ./bin/mysqld_safe &
- cd /usr/local/mysql
- sudo ./bin/mysql_secure_installation
Setup the real website.
Lets make our website, as a start, a single PHP page with 'Hello world'
Ok ok, a real linux champ will develop websites in a vt100 terminal with emacs, but wannabies like me will use Chrome OS apps like Caret, or a web edit like Codiac, that's why we put our website in ~/Downloads, so that Chrome OS apps like Caret can see it.
- chmod 755 ~/Downloads
- mkdir ~/Downloads/champ
- mkdir ~/Downloads/champ/htdocs
pico ~/Downloads/champ/htdocs/index.php
Put below content in the file.
echo 'Hello world';
?>
Some more Apache configuration is needed to let Apache use above website and some other little tweeks
- sudo pico /usr/local/apache2/conf/httpd.conf
Listen 127.0.0.1:80Then add below new lines at the end of the httpd.conf file.
User champ
Group champ
ServerName localhost:80
DocumentRoot '/home/champ/Downloads/champ/htdocs'
Restart apache to activate this new configuration
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
- sudo /usr/local/apache2/bin/apachectl restart
phpMyAdmin
Install
- cd ~/Downloads/champ/htdocs
- unzip ~/Downloads/phpMyAdmin-4.4.14-all-languages.zip
- mv phpMyAdmin-4.4.14-all-languages phpMyAdmin
- cd ~/Downloads/champ/htdocs/phpMyAdmin/sql
- /usr/local/mysql/bin/mysql --user=root --password=????? < create_tables.sql
- cd ~/Downloads/champ/htdocs/phpMyAdmin
- mv config.sample.inc.php config.inc.php
- pico config.inc.php
$cfg['blowfish_secret'] = 'your_biggest_secret';Go to it
http://localhost/phpMyAdmin
Starting and stopping MySQL & Apache/PHP
To make standard Linux start scripts, execute below commands.
- sudo cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
- sudo cp /usr/local/apache2/bin/apachectl /etc/init.d/apache
- sudo service mysql start
- sudo service mysql stop
- sudo service apache start
- sudo service apache stop
Starting in the background & closing the chrosh tab afterwards
- t
- shell
- sudo enter-chroot -b sleep infinity
Chromebook Campfire
Both the tboth the Crosh and Bash shells remember the commands you execute, so the next times you only need the & keys for this, it can be done in 2 secondsAutomatic starting MySQL & Apache/PHP
However, it is possible to start Champ automatically after you login in your Chromebook. Add below file as champ.conf to /etc/init , note that this is in the ChromeOS file sytem, not the chrooted linux file system.
start on start-user-session
stop on stopping ui or starting halt or starting reboot
script
sudo enter-chroot sleep infinity
end script
Please see also below page, that page covers in dept making the ChromeOS root file system writable and starting the Chroot environment automatically.
If you are going to use above page to autostart your Chroot, then below settings must be done in ~/Downloads/crouton.init to match the setup as given in this blog posting.
CHROOT=jessie
START_DE=enter-chroot
CHROOT_APP=sleep infinity
XMETHOD=default
by Victor A. Requena
Debugging your web applications with Visual Studio Code makes you more efficient. It helps you save a lot of time and keeps your code cleaner. This is because you don't have to write a bunch of console.log
s and you can go through your code execution line by line. But if you're here, you probably know the benefits of debugging web applications. So let's begin…
Getting set up
The first thing you need to do is install the Debugger for Chrome extension. After you've installed it, you're almost ready to go. The next thing you need to do is create a launch file for the Visual Studio Code Debugger. This file contains the debugger's different configurations for your project.
You can create the launch file by going to the debug section in the Activity Bar and clicking the gear icon.
A list of options will prompt you to select the 'Chrome' one.
After you've done this, you're going to have a .vscode
directory with a launch.json
Utc clock. file.
Configurations
There are two kinds of Chrome debugging configurations: launch
and attach
. You can set this in the request
option inside every configuration object.
Launch
The launch configuration launches a Chrome instance running a specified file or URL. If you specify a URL, you have to set webRoot
to the directory that files are served from. This can be either an absolute path or a path using the ${workspaceFolder}
resolver. This is the folder opened in your Visual Studio Code workspace.
Note: Be careful while setting webRoot
, this is used to resolve URLs to a file on your computer.
You can see an example of two launch
configurations: One launching against a local server and the other launching against a local file.
If you have a Chrome instance running, the one launched by the debugger will use a temporary session. This means that you won't have your extensions or opened tabs. If you want to launch a Chrome instance with your user and extensions, you have to close every running instance first.
Chromebook Xampp Download
Note: When you stop the debugger, this will close the Chrome window.
Chromebook Xampp Software
Attach
I personally prefer using this one… This configuration attaches the debugger to a running instance of Chrome. But in order for this option to work, you need to launch Chrome with remote debugging enabled. Launching a Chrome instance with remote debugging varies depending on your OS.
Windows
There are two ways to launch Chrome with remote debugging in Windows. The simplest one is to right-click on the Google Chrome shortcut. Select the properties option and append the following command in the target field.
- sudo apt-get install gcc g++ make cmake bison zip libaio-dev libapr1-dev libaprutil1-dev libpcre3-dev libxml2-dev libncurses5-dev libmcrypt-dev tidy libtidy-dev
Compile, install & start Apache
First step, the A from Champ, the Apache webserver
- cd ~
- tar zxvf Downloads/httpd-2.4.16.tar.gz
- cd httpd-2.4.16
- ./configure --with-mpm=prefork
- make
- sudo make instal
- sudo /usr/local/apache2/bin/apachectl start
http://localhost
Compile, install, configure & start PHP
PHP is next.
- cd ~
- tar zxvf Downloads/php-7.0.0RC3.tar.gz
- cd php-7.0.0RC3
- ./configure --with-apxs2=/usr/local/apache2/bin/apxs --enable-mbstring --with-mysqli --with-mcrypt --with-tidy
- make
- sudo make install
- sudo pico /usr/local/apache2/conf/httpd.conf
DirectoryIndex index.htmlAnd change it into
DirectoryIndex index.php index.htmlAnd add below lines just after the loading of the PHP 7 module.
Restart apache with below command
SetHandler application/x-httpd-php
- sudo /usr/local/apache2/bin/apachectl restart
- sudo pico /usr/local/apache2/htdocs/phpinfo.php
phpinfo();And got to below url in Chrome
?>
http://localhost/phpinfo.php
Compile, setup and start MySQL
This one will take some time
- cd ~
- tar zxvf ~/Downloads/mysql-5.6.26.tar.gz
- cd mysql-5.6.26
- cmake .
- make
- make install
- cd /usr/local/mysql
- sudo chown -R champ:champ .
- ./scripts/mysql_install_db --user=champ
- chown -R root .
- sudo pico /usr/local/mysql/my.cnf
bind-address=127.0.0.1The first line makes sure that only your local Chromebook can access MySQL.
user=champ
The second line defines the runtime user the MySQL deamon runs under.
- cd /usr/local/mysql
- sudo ./bin/mysqld_safe &
- cd /usr/local/mysql
- sudo ./bin/mysql_secure_installation
Setup the real website.
Lets make our website, as a start, a single PHP page with 'Hello world'
Ok ok, a real linux champ will develop websites in a vt100 terminal with emacs, but wannabies like me will use Chrome OS apps like Caret, or a web edit like Codiac, that's why we put our website in ~/Downloads, so that Chrome OS apps like Caret can see it.
- chmod 755 ~/Downloads
- mkdir ~/Downloads/champ
- mkdir ~/Downloads/champ/htdocs
pico ~/Downloads/champ/htdocs/index.php
Put below content in the file.
echo 'Hello world';
?>
Some more Apache configuration is needed to let Apache use above website and some other little tweeks
- sudo pico /usr/local/apache2/conf/httpd.conf
Listen 127.0.0.1:80Then add below new lines at the end of the httpd.conf file.
User champ
Group champ
ServerName localhost:80
DocumentRoot '/home/champ/Downloads/champ/htdocs'
Restart apache to activate this new configuration
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
- sudo /usr/local/apache2/bin/apachectl restart
phpMyAdmin
Install
- cd ~/Downloads/champ/htdocs
- unzip ~/Downloads/phpMyAdmin-4.4.14-all-languages.zip
- mv phpMyAdmin-4.4.14-all-languages phpMyAdmin
- cd ~/Downloads/champ/htdocs/phpMyAdmin/sql
- /usr/local/mysql/bin/mysql --user=root --password=????? < create_tables.sql
- cd ~/Downloads/champ/htdocs/phpMyAdmin
- mv config.sample.inc.php config.inc.php
- pico config.inc.php
$cfg['blowfish_secret'] = 'your_biggest_secret';Go to it
http://localhost/phpMyAdmin
Starting and stopping MySQL & Apache/PHP
To make standard Linux start scripts, execute below commands.
- sudo cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
- sudo cp /usr/local/apache2/bin/apachectl /etc/init.d/apache
- sudo service mysql start
- sudo service mysql stop
- sudo service apache start
- sudo service apache stop
Starting in the background & closing the chrosh tab afterwards
- t
- shell
- sudo enter-chroot -b sleep infinity
Chromebook Campfire
Both the tboth the Crosh and Bash shells remember the commands you execute, so the next times you only need the & keys for this, it can be done in 2 secondsAutomatic starting MySQL & Apache/PHP
However, it is possible to start Champ automatically after you login in your Chromebook. Add below file as champ.conf to /etc/init , note that this is in the ChromeOS file sytem, not the chrooted linux file system.
start on start-user-session
stop on stopping ui or starting halt or starting reboot
script
sudo enter-chroot sleep infinity
end script
Please see also below page, that page covers in dept making the ChromeOS root file system writable and starting the Chroot environment automatically.
If you are going to use above page to autostart your Chroot, then below settings must be done in ~/Downloads/crouton.init to match the setup as given in this blog posting.
CHROOT=jessie
START_DE=enter-chroot
CHROOT_APP=sleep infinity
XMETHOD=default
by Victor A. Requena
Debugging your web applications with Visual Studio Code makes you more efficient. It helps you save a lot of time and keeps your code cleaner. This is because you don't have to write a bunch of console.log
s and you can go through your code execution line by line. But if you're here, you probably know the benefits of debugging web applications. So let's begin…
Getting set up
The first thing you need to do is install the Debugger for Chrome extension. After you've installed it, you're almost ready to go. The next thing you need to do is create a launch file for the Visual Studio Code Debugger. This file contains the debugger's different configurations for your project.
You can create the launch file by going to the debug section in the Activity Bar and clicking the gear icon.
A list of options will prompt you to select the 'Chrome' one.
After you've done this, you're going to have a .vscode
directory with a launch.json
Utc clock. file.
Configurations
There are two kinds of Chrome debugging configurations: launch
and attach
. You can set this in the request
option inside every configuration object.
Launch
The launch configuration launches a Chrome instance running a specified file or URL. If you specify a URL, you have to set webRoot
to the directory that files are served from. This can be either an absolute path or a path using the ${workspaceFolder}
resolver. This is the folder opened in your Visual Studio Code workspace.
Note: Be careful while setting webRoot
, this is used to resolve URLs to a file on your computer.
You can see an example of two launch
configurations: One launching against a local server and the other launching against a local file.
If you have a Chrome instance running, the one launched by the debugger will use a temporary session. This means that you won't have your extensions or opened tabs. If you want to launch a Chrome instance with your user and extensions, you have to close every running instance first.
Chromebook Xampp Download
Note: When you stop the debugger, this will close the Chrome window.
Chromebook Xampp Software
Attach
I personally prefer using this one… This configuration attaches the debugger to a running instance of Chrome. But in order for this option to work, you need to launch Chrome with remote debugging enabled. Launching a Chrome instance with remote debugging varies depending on your OS.
Windows
There are two ways to launch Chrome with remote debugging in Windows. The simplest one is to right-click on the Google Chrome shortcut. Select the properties option and append the following command in the target field.
Note: This will launch Chrome with remote debugging enabled every time you click on the shortcut.
The other way is to open the command prompt and execute this command replacing the th> with the actual location of your Chrome installation.
macOS
Open the terminal and execute the following command:
Chromebook Xampp Pro
Linux
Launch your terminal and run this command:
What this does — no matter what OS — is open Chrome with a flag, in this case:
--remote-debugging-port
, and sets it to 9222
. You can read more about this here.
Note: If you have other Chrome instances running with no remote debugging, make sure to close them before launching a new one.
Here's a sample
attach
configuration.
Note: If you do not set the
'url'
option, a list will be prompted with your open tabs. UTC to Honolulu Converter - Convert Universal Time to ....
This extension have a lot of very useful options that you can use to adapt the configurations to your project. You can read the documentation of some of them here.
Summary
Congratulations! You've learned how to install and set up the debugger for Chrome in Visual Studio Code. You also learned how to launch Google Chrome with remote debugging enabled. Now it's time for you to explore and expand your new knowledge… I highly recommend you to take a look at the extension's repository.
I hope you enjoyed this post. You can find me on Twitter @_svictoreq. ?