For javascript use the Chrome debugger. Just press F12 and he will appear. Go on the option console and make your debauchery.
For PHP it’s not that simple but it’s easy. First of all I wanted to comment on the IDE. There are many on the market. Free or not and each programmer has their own preference. I use Netbeans. It is free and complete. No many bureaucracies to install extensions including debuggers. Here you can do the download of the version that suits you.
To run a debtor in an IDE you need to:
- Configure the deboner or debugger in the php startup file, the php.ini.
- Configure the IDE to accept the debtor already installed. NOTE: If you use netbeans, this step is not necessary as it recognizes the configuration within the php.ini automatically.
Regardless of the IDE used you will have to configure Xdebug on php.ini and that is the most laborious part. The second part, of IDE Aptana I will pass the link with step by step.
- Create a project with any name and then a page containing
phpinfo();
only;
- Open the browser that displays the information from phpinfo and copy everything (
crtl+a
next crtl+c
)
- Go to that link of Xdebug and paste its contents into the appropriate space and press the button Analyse my phpinfo output. See photo below:
- This tool will find the dll extata for your php versatile. See the photo below:
- Click on the file dll offered and download.
- Find the folder where PHP extensions are located (ext). In some installations it is directly inside the PHP type directory (php>ext) in others it is inside the bin folder (php>bin>ext). Note that the tool showed you in green the path of php.ini and the folder ext according to installing php on your machine.
- Paste the file .dll of the Xdebug you downloaded from inside that folder ext. The php nicialization file (php.ini) will look for that file .dll inside this folder to enable the debogage function.
- So you need to write inside the php.ini the path (path) to that file .dll. And also pass on some information that the IDE will use for the debugging or debugging session. If you don’t, the IDE will throw an error message. Copy and paste the following lines at the bottom of your file php.ini then save:
[XDebug]
zend_extension="[AMP Path]\php\ext\php_xdebug.dll"
THIS IS YOUR PATH TO . dll
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.remote_port = 9000
Once these steps are done, your IDE and PHP should already be set up for the deboning session. Restart the server and run the page containing the phpinfo()
. You will notice that there was a change in the presentation of the page phpinfo. And the message showing that the Xdebug was successfully installed, see photo below:
Ready. From now on the debugger has been unsaved and configured on your machine. If you were using netbeans your config would stop here. To proceed with setting up Aptana follow this step by step.
And although it is not the scope of the question, put here a picture of a simple debugging session with Xdebug and Netbeans. Testing an element error with same id in DOM:
Each language has its own methodology, Windows want to debug what? html js php?
– user45474
php, ajax, js basically
– MagicHat