XDebug with Aptana Studio 3

前端 未结 5 1411
攒了一身酷
攒了一身酷 2021-02-01 21:05

I would like to know how i can get XDebug work with Aptana Studio 3 (I already have Aptana Studio 3 on this machine with XAMPP).

Do you know a recent article telling me

5条回答
  •  情话喂你
    2021-02-01 22:01

    Here is a mini how-to configure and start using XDebug with Aptana Studio 3.3, assuming you have installed xdebug on your system. (In Ubuntu/Linux it's just a sudo apt-get install php5-xdebug).

    Configure the debugger

    In preferences->Aptana Studio->PHP->PHP Interpreter click on Add..., and specify a name, the php executable(/usr/bin/php in most Linux distributions), the php.ini(/etc/php5/conf.d/20-xdebug.ini on my system), and leave XDebug in the select field of PHP debugger.


    Using the debugger

    Make a php file and put some code in it:

    
    

    Save it and press Run->Debug As->PHP Script and you will be prompted to switch Workspace.

    Specify a Line Breakpoint by double clicking next to a line number, for example at the line of exit() function. Press Resume(F8) and you can see that the Debug Current Instruction Pointer moved there.
    At the variables tab, you should now see which variables have some value or they are uninitialized. The output can be found at the console tab.

    Pressing resume again will terminate the debug.


    Of course, this is only the tip of the iceberg regarding debug, but it's a start.
    There are many other options to explore and ways to debug your scripts.

提交回复
热议问题