From 026bb9d5ed141f3a5177cf3ecaa5c7786d78d583 Mon Sep 17 00:00:00 2001 From: Joseph Geller Date: Wed, 19 Sep 2018 14:19:12 -0500 Subject: [PATCH] Updated 4a. JCB Demo Component Directory, Folders and Files (markdown) --- 4a.-JCB-Demo-Component-Directory,-Folders-and-Files.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/4a.-JCB-Demo-Component-Directory,-Folders-and-Files.md b/4a.-JCB-Demo-Component-Directory,-Folders-and-Files.md index 3b2b40f..7df3116 100644 --- a/4a.-JCB-Demo-Component-Directory,-Folders-and-Files.md +++ b/4a.-JCB-Demo-Component-Directory,-Folders-and-Files.md @@ -39,13 +39,13 @@ Debugging tools are an essential part of any developer's IDE. Spending hours try There are [many other features](https://netbeans.org/kb/docs/php/debugging.html) and functionalities not mentioned here. Effective debugging is indispensable during the development cycle of a component. It enhances the JCB build process and allows you to quickly identify and resolve issues in the component after JCB has compiled it successfully, but the component has run-time errors. Also, make use of Joomla's! built in debugging enabled in its configuration settings. The stack trace it displays, including links if using XDEBUG, are also indispensable. Plus, it integrates with an IDE like NetBeans using the [Chrome NetBeans extension](https://chrome.google.com/webstore/detail/netbeans-connector/hafdlehgocfcodbgjnpecfajgkeejnaa?hl=en). -Getting XDEBUG to work with your browser and IDE can be a daunting task. [This guide](https://quantumwarp.com/kb/articles/87-netbeans/928-debugging-with-netbeans-xdebug-and-xampp-in-windows) and [another one](https://articlebin.michaelmilette.com/making-xdebug-work-with-netbeans-on-windows/) have excellent tips on using XDEBUG with NetBeans and other IDE's and include using it with a browser. It is also recommended to use [this excellent tool](https://xdebug.org/wizard.php) as it creates the necessary php.ini lines you will need to replace what NetBeans puts there which is just a stub except for the line that loads the correct DLL. The two links before that one are for understanding XDEBUG and what must be done to install it properly. The php.ini lines in them are not needed usually and the tool works just fine. +Getting XDEBUG to work with your browser and IDE can be a daunting task. [This guide](https://quantumwarp.com/kb/articles/87-netbeans/928-debugging-with-netbeans-xdebug-and-xampp-in-windows) and [another one](https://articlebin.michaelmilette.com/making-xdebug-work-with-netbeans-on-windows/) have excellent tips on using XDEBUG with NetBeans and other IDE's and include using it with a browser. They also have instructions on how to troubleshoot the default port it uses and how to differentiate if the default port (9000) used by XDEBUG is the issue such as it is blocked by your firewall and needs a rule to punch through it or the required lines in the php.ini aren't there or are incorrect, or some other reason. It is also recommended to use [this excellent tool](https://xdebug.org/wizard.php) as it creates the necessary php.ini lines you will need to replace what NetBeans puts there which is just a stub except for the line that loads the correct DLL. The two links before that one are for understanding XDEBUG and what must be done to install it properly plus excellent troubleshooting instructions. The php.ini lines both suggest are not needed usually so use the php.ini lines generated by the tool in the last link in this paragraph. -Each PHP version (WAMP allows switching between 5.x and 7.x) uses a different DLL in php.ini that WAMP switches between when different PHP versions are used. WAMP current version allows switching between that last 5.x version and three 7.x versions. So, do not change what was installed by WAMP at the end of php.ini. Comment out all the lines underneath using a semicolon (;) in each php.ini used by WAMP for each PHP version it allows you to switch to which is very nice for let's say looking at latest Joomla! version, e.g Joomla! 4 alpha. +WAMP allows switching between 5.x and 7.x versions of PHP. To facilitate XDEBUG WAMP uses a different XDEBUG DLL in the php.ini that WAMP switches between when different PHP versions are used. WAMP current version allows switching between that last 5.x version and three 7.x versions. So, do not change what was installed by WAMP at the end of php.ini. Comment out all the lines underneath using a semicolon (;) in each php.ini used by WAMP for each PHP version it allows you to switch to which is very nice for let's say looking at latest Joomla! version, e.g Joomla! 4 alpha. Not using the correct DLL is the most common error when using XDEBUG and WAMP sets this up correctly. The other error that is very common is not having the [Visual C++ Packages](http://wampserver.aviatechno.net/?lang=en&prerequis=afficher) installed for the corresponding version of PHP that was compiled. Let WAMP do this for you. The previous link appears to be the best one to use for a comprehensive installation of WAMP that is a one-page-stop for everything you need. Since there are many versions of WAMP, although you should be using the current one, it will not hurt to install all of the Visual C++ Packages. It takes some time and you must install the 32 and 64 bit versions and I suggest doing it in date order starting with the earliest and ending with the latest. Read through the page completely so you install everything that is required. Follow all the recommendations that are also on the page. -You can install all of the Visual C++ Packages as you will have then have whatever version of the package is needed for whatever version you have of PHP. Do not worry that two are French. They work fine but you may need to be sure you click the OK button instead of Cancel as they are in French. Other than that all else on the page installs in English. The dependency the PHP version has with each Visual C++ Package version depends on the version of the Visual C++ Package that was used to compile the PHP version. Like anything worth the effort, do the work and read the information in the sites I have mentioned previously. Often, XDEBUG if you just install it and hope the installation took care of everything. More than likely they had the right Visual C++ Package installed and did not change the DLL php.ini was loading. But it seems like many have issues with it as they depended on the install to do everything, including their environment. XAMPP will install XDEBUG without much effort from you but WAMP is a much better environment to work in. The same applies for LAMP and MAMP. +You can install all of the Visual C++ Packages as you will have then have whatever version of the package is needed for whatever version you have of PHP. Do not worry that two are French. They work fine but you may need to be sure you click the OK button instead of Cancel as they are in French. Other than that all else on the page installs in English. The dependency the PHP version has with each Visual C++ Package version depends on the version of the Visual C++ Package that was used to compile the PHP version. Like anything worth the effort, do the work and read the information in the sites I have mentioned previously. Often, XDEBUG if you just install it and hope the installation took care of everything. More than likely they had the right Visual C++ Package installed and did not change the DLL php.ini was loading. But it seems like many have issues with it as they depended on the install to do everything, including their environment. XAMPP will install XDEBUG without much effort from you but WAMP is a much better environment to work in. The same applies for LAMP and MAMP. It is beyond the scope of this manual to go into Linux and Mac operating systems also but the same concepts apply and many of the links also refer to these operating systems. It should be mentioned for those wishing to take the quick path you can browse com_demo_v2_0_0__J3.zip directly using Windows File Explorer as one example and skim through the tree and files without extracting it. However, this is a [Joomla! component install package](https://docs.joomla.org/File_Structure_and_Naming_Conventions) so it will not match the directory structure. If you are familiar with the Joomla! installation package requirements and structure this should not be a problem. For some, this is all they require, especially if they are very experienced PHP developers, have used the Joomla! API extensively and found JCB was not very difficult to learn by using the JCB Component Builder after it is installed, plus browsing through its code.