====== Eclipse IDE ======
The [[http://www.eclipse.org/ide/|Eclipse IDE]] Integrated Development Environment is open source and provides an excellent environment to develop web applications. I migrated the LAMP server from XAMPP to WSL (Windows Subsystem for Linux) with the arrival of Windows 10. See [[outd:eclipse|here]] for XAMPP related instructions.
^ Application ^ Version ^
| Eclipse for PHP Developers | 2024-03 |
| OS | Debian 12.5 |
| Apache | 2.4.59 |
| PHP | 8.3.7 |
| MariaDB | 10.11.61 |
1[[https://mariadb.com/kb/en/incompatibilities-and-feature-differences-between-mariadb-10-11-and-mysql-8/|MariaDB 10.11 versus MySQL 8.0]]
===== LAMP with Xdebug =====
* Follow [[deb12:lamp|LAMP on Debian 12]]
===== Eclipse IDE =====
==== Java ====
Eclipse requires Java to run, so install this first.
* Install Java Runtime Environment [[http://www.filehippo.com/download_jre_32|32 Bit Version]] or [[http://www.filehippo.com/download_jre_64|64 Bit Version]]
* If you have recently installed Java 8 and uninstalled older versions, install [[http://www.oracle.com/technetwork/java/javase/downloads/index.html|Java SE Development Kit 8]] and retry.
* If you get a [[http://stackoverflow.com/questions/11461607/cant-start-eclipse-java-was-started-but-returned-exit-code-13|Java was started but returned exit code=13]] error, you most likely installed the wrong Java version. Try re-installing Java with the 64-bit version, or vice versa.
==== Eclipse ====
* Install [[http://www.eclipse.org/downloads/|Eclipse for PHP Developers]]
* Choose x:\ as installation path, where "x" can be any drive letter available to your system, also a portable one.
* [[https://wiki.eclipse.org/FAQ_How_do_I_increase_the_heap_size_available_to_Eclipse%3F|How do I increase the heap size available to Eclipse?]]
==== JavaScript ====
=== Links ===
* [[https://stackoverflow.com/questions/12269560/javascript-editor-plugin-for-eclipse|JavaScript Editor Plugin for Eclipse]]
* [[https://nodejs.org/en/download/|Download Node.js]]
* [[https://www.dev2qa.com/how-to-run-debug-node-js-application-with-eclipse/|How To Run / Debug Node.js Application With Eclipse]]
==== TypeScript ====
Install the [[http://typecsdev.com/|TypeScript]] IDE for Eclipse.
- Install required software: [[http://www.oracle.com/technetwork/java/javase/downloads/index.html|Java 7]], [[https://www.eclipse.org/downloads/|Eclipse Kepler 4.3]] or higher, [[http://nodejs.org/|Node.js]].
- In Eclipse go to **Help → Install New Software...**
- Provide the installation location http://axmor.bitbucket.org/typecs/stable/update-site/
- Mark the plugin version you would like to install then press **Next...**
- On Install Details press **Next...**
- Review and confirm the plugin to install.
- Restart Eclipse.
==== Settings ====
- Go to **Window -> Preferences -> General** and enable "Show heap status".
- Go to **Window -> Preferences -> General -> Workspace** and modify the Workspace settings.{{ :web:workspace.jpg?100 |Workspace}}
- Go to **Window -> Preferences -> General -> Web browser** and set the desired browser for browser output.{{ :web:webbrowser.jpg?100 |Web browser}}
- Go to **Window -> Preferences -> PHP -> Servers** and enter the web server settings.{{ :web:phpserver.jpg?100 |PHP Server}}
- Go to **Window -> Preferences -> PHP -> Validation** and set the PHP version.{{ :web:validation.jpg?100 |Validation}}
- Go to **Window -> Preferences -> PHP -> Debug -> Debuggers** and check the XDebug settings. They must comply with the settings in the php.ini file. Set "Accept remote session (JIT)" to //off// if you don't want the debugger to automatically start when opening any URL on localhost.{{ :web:xdebug.jpg?100 |XDebug}}
- There are three places where the "Break on first line" configuration can be set:
* Window -> Preferences -> PHP -> Debug
* Project -> Properties -> PHP -> Debug
* Run -> Debug Configurations -> PHP Web Application -> -> Debugger
- Add or Edit **Debug Configurations...**. If you pointed the DocumentRoot to your workspace, then you can leave the URL on "Auto Generate", otherwise you must modify the URL.{{ :web:debug.jpg?100 |Debug Configuration}}
- **Window --> Preferences --> PHP --> Code Style --> Formatter**. Select "PHP Conventions" as active profile.{{ :web:phpconvention.jpg?100 |PHP Formatter}}
- **Window --> Preferences --> General --> Editors --> Text Editors**. Uncheck "Use find/replace overlay" (see [[https://stackoverflow.com/questions/79012836/eclipse-2024-09-is-there-a-way-to-get-the-old-find-replace-window-back|Eclipse 2024-09 Is there a way to get the old Find/Replace window back?]])
- If you have existing projects
* either select the project directory as workspace when first starting up the new eclipse, or
* delete the workspace directories and files (filenames start with "."), then import the project directories with **File --> Import --> General --> Existing Projects into Workspace**
=== Links ===
* [[https://stackoverflow.com/questions/3924229/adding-existing-project-folders-to-the-project-explorer-in-eclipse|Adding existing project folders to the project explorer in eclipse]]
* [[http://www.iholken.com/index.php/2016/03/15/guide-for-installing-owncloud-9-to-synology-nas-running-dsm-6/|Guide for installing Owncloud 9 to Synology NAS running DSM 6]]
* [[https://xpenology.club/install-owncloud-10-on-dsm-6-1/|Install Owncloud 10 on DSM 6.1]]
* [[https://www.cs.odu.edu/~zeil/FAQs/Public/win10Bash/|Setting Up a Programming Environment via Windows 10 Bash]]
* [[https://stackoverflow.com/questions/844759/eclipse-stuck-when-building-workspace|eclipse stuck when building workspace]]