Thursday, September 9, 2010
Setup and debug an Yii app in Netbeans IDE
Create a project stub using the following command -
>> yii-1.1.3.r2247\framework\yiic webapp mytestapp
Open Netbeans IDE and proceed with the following steps -
1. Click on File-> New Project
This will open up a dialog box. Select "PHP" under "Categories" and under "Projects" select "PHP Applications with Existing Sources".
Click Next.
2. In the "Sources Folder", input the path of "mytestapp" folder on your machine.
Assign a project name. "mytestapp" for my case.
Select a PHP version.
Click Next
3. The options in this form should be set up automatically like below.
Click Finish
This should set up your Yii project in Netbeans IDE.
4. Go to "Debug" menu on the top bar on Netbeans IDE. Select "Debug Project(mytestapp)" and you should be able to debug your project.
5. "Continue(F5)" option in Debug can be used to resume a stopped debug session.
Saturday, June 20, 2009
Turbogears debugging in Eclipse
Setting up debug enabled environment for a Turbogears application in Eclipse is not really straightforward. I struggled a lot before I could set it up. Initially I wasnt even sure if I could set up break points and debug the application like in microsoft visual studio. It is very much possible although some of the things are not very obvious. Here is a list of things to check up, if you are facing problems.
1. You can install Pydev by following the instructions mentioned on pydev website. You can also have a look at this ibm site which helps you make the necessary settings in Eclipse.
2. You can patch the Decorators file from pydev blog. If you are facing any problems drop your email id I will send you the patched file.
>easy_install -U turbojson==1.1.4
>easy_install -U DecoratorTools==1.4
4. Remember, you will still see the following error when you start the debug session.
PYDEV DEBUGGER WARNING:
sys.settrace() should not be used when the debugger is being used.
This may cause the debugger to stop working correctly.
If this is needed, please check:
http://pydev.blogspot.com/2007/06/why-cant-pydev-debugger-work-with.html
to see how to restore the debug tracing back correctly.
Call Location:
File "C:\Python24\lib\site-packages\decoratortools-1.4-py2.4.egg\peak\util\decorators.py", line 562, in uninstall
But, wait for a few seconds and eclipse will start the debug session after the error message.