![]() From “File” menu, choose “New Project …”: Check this kind of information for each service in WAMP through its menus. In the next section we will debug a real PHP code in NetBeans.īefore we start, be sure that the WAMP Apache server is running. NOTE: remember that I’ve put xdebug.remote_port=9010 only because I set it to the same value in NetBeans previously.Ĭonfiguration is finished. We need to add the following lines directly after the : Xdebug.profiler_output_dir = “c:/wamp/tmp” ![]() ![]() Scroll to the end of the file and you should find the following section: To activate XDebug, we need to add some new lines in the PHP.ini file. ![]() Lunch WAMP, go the “PHP” menu, and open the “PHP.ini” file. Now that we’ve finished configuring NetBeans, we need to configure WAMP. Netbeans –> “Tools” menu –> “Options” –> “PHP” page –> “General” tab –> Debugger port. Because I don’t want to use 9000, I chose 9010 instead, so we open the options and change the port if needed: The default is (9000), but in case 9000 is already reserved, we can simply change it. First, we want to define the port in NetBeans to which XDebug will try to connect. On the other hand, there is a browser who is connected to WAMP server on default HTTP port 80 and viewing the results:īefore we can start debugging, there are some configurations to do. port 9000) so XDebug can make a connection to that socket using the specified port number and handle communication with NetBeans. In real life, NetBeans listen on a socket on a specific port (e.g. With the right configurations to both XDebug and NetBeans, WAMP can be able to communicate with NetBeans for debugging purposes. This communication facility is called “XDebug”. Now, for that scenario to be achievable, we need a mean of Communication between NetBeans and WAMP. NetBeans points to the new location in code and await our orders again.WAMP execute a step of code and tells NetBeans that it moved a step.NetBeans sends a notification to WAMP that it can move a step. NetBeans is pointing to the first line waiting our command, while WAMP is waiting on the first line waiting NetBeans’ command.NetBeans edits our PHP code, WAMP interprets (executes) it … so, to debug the code in stepping mode, we need to establish the following scenario: We will now explain how the debugging process goes in concept, then we will demonstrate how we can get it working in real life. What’s nice about NetBeans (and exist in other IDEs as well) is that it can debug our PHP code. Now that we have downloaded and installed the 2 packages. Install the applications and get ready for some theory. WAMP is a member of the AMP (Apache MySQL PHP) package servers, which is composed basically of the 3 mentioned kinds of technologies, and there are other AMP servers than WAMP, but we will use this one because it’s rather simple. Second, we want to download the WAMP Server. Right now, we are interested in the PHP Bundle: And if we want all NetBeans features and capabilities in one package we can download the Full Bundle that has simply everything. Note that NetBeans IDE comes in different bundles, where each bundle is oriented toward a development context (e.g. I then tried to reload the debugging but it went back to waiting for connection.In this post, I am going to discuss how we can produce a neat looking and robust PHP sites using NetBeans 7.0 as a developing environment and WAMP server as executional environment.įirst, we need to download the NetBeans IDE. It has worked for me twice (it went to debugging mode) but after clicking continue (it stopped on the first line in index.php) it wouldn't work anymore and the page wouldn't load. I then try to debug my project but it just gets stuck on I have pointed netbeasns to xdebug-netbeans at port 9001. I'm now trying to connect netbeans to xdebug so that I can actually debug my code. This is working as I can see xdebug in my phpinfo(). zend_extension="/Applications/MAMP/bin/php/php5.5.26/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so" I am using MAMP to run the project and have configured xdebug in the php.ini file as follows. I am trying to set up xdebug so that I can debug my php wordpress project.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |