- Download Eclipse Kepler: 4.3.2 Release
- Install PHP Development Tools PDT
- Install Graphviz
- Put
org.phpsemantics.debug.core
,org.phpsemantics.debug.ui
andtools
intoEclipse/dropins
directory.
From Eclipse menu: Help > Install New Software Work with: http://download.eclipse.org/tools/pdt/updates/3.3
- set path of dot in
makeGraph
(only for Mac) - kompile php.k
You need to add the path of dot tool into makeGraph
script as following:.
Change export PATH=$PATH
with export PATH="/path/of/dot":$PATH
You can get path of dot by:which dot
Under kphp2
directory, run this command: ./../k/bin/kompile/php.k
This might take a few minutes. When it finishes, you get the php-kompiled
folder in kphp2
.
- Create a PHP project
- Open Debug Perspective
- Create new Debug Configuration
File -> New -> Other -> PHP project
Doulbe click on KPHP
, specify the script you want to debug
Check if the interpreter is working:
run following commands under tools/kphp2
directory:
scripts/kphp example-breakpoint.php
Then you should get output in XML-like notationm (go to KPHP website to know more about output)
Check version of the k tool
run following commands under tools/k/bin:
./krun -version
Then it should say:
cd ./krun -version
K-framework nightly build.
Git Revision: eb0a7cb
Build date: Fri May 23 10:49:48 CDT 2014
Check the dot tool
Under tools directory, run following command:
./makeGraph example.dot example.png
Then you should get a directed graph.