Blog  
 
  Lextech Blog  

Recent Articles

Making Money
With Technology
Systems
Engineering

Lextech

Tech News

Posts Tagged ‘Eclipse’

Debug CakePHP in Eclipse - Bake Cakes Not Brownies

by: Jeff

Thursday, June 5th, 2008

Having developed several CakePHP projects in Eclipse, I’ve always been on the lookout for things to make my life easier. Not too long ago I stumbled across an addition to Eclipse’s PHP Development Tools (PDT), which integrates the Zend/Xdebug debuggers into the Eclipse environment. The ZendDebugger binaries are available for OS X, Linux and Windows platforms at Zend’s website http://www.zend.com/en/community/pdt.

Also on this page, you may also find an all-in-one bundle for Eclipse that has everything you need to get started. Once the debugger is loaded in PHP and your web server has been restarted, you can open Eclipses debug dialog and create a new PHP Web Page profile.

First configure the “PHP Server” section to point to the development server your project exists on. Then set /<project name>/app/webroot/index.php for the “File” section of the PHP server debug dialog as well as http://<host name>/ , index.php respectively for the two entry boxes of the “URL” section. On the advanced tab select “Debug All Pages” and the debugger will now recognize any breakpoints in all .php files in your project!

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Digg
  • Facebook
  • Slashdot
  • Technorati

Eclipsing Xcode for Mac Development

by: Nate

Friday, May 16th, 2008

Apple has a (well-earned) reputation for creating products that are simply a pleasure to use. The iPhone springs to mind as a crowning achievement in this regard. But man, do I ever hate Xcode.

Nothing is where I expect it to be. I can’t seem to close a window I don’t want without closing the whole project. When I try to debug an application, I can’t get the present value of variables in all levels of the stack trace.

I’m willing to consider the possibility that it works great, and I’m just doing it wrong. Maybe it’s just the inertia of being comfortable with my current IDE. But in any event, when I found myself needing to write and compile a C application using OSX libraries, I let out a bit of a groan.

Imagine my relief when I finally figured out how make Eclipse see the OSX libraries. All you have to do is add an entry to Project Properties-> C/C++ Build-> Settings-> Tool Settings-> MacOS X C Linker-> Miscellaneous-> Linker flags. For each framework you want to use, just add:

-framework framework_name

For instance, after adding:

-framework QuickTime

I was able to use the Quicktime libraries by adding the appropriate import to my files:

#include <QuickTime/QuickTimeComponents.h>

Easy, right? I would add the caveat that I have not yet done any GUI development using the native OSX libraries, so YMMV. Xcode may still be your best choice when making interfaces using Cocoa and Quartz. But if you just want to write C/C++ applications to unleash your Mac’s inner Unix, Eclipse is hard to beat.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Digg
  • Facebook
  • Slashdot
  • Technorati