I am developing an Task Pane Office Add-in using the Office JavaScript APIs in Visual Studio. When you run the application it runs in the desktop client version of Office.
You can create a free 30 day trial tenant for Office 365 for testing. You'll be able to publish the Add-in, and test with an account of that tenant.
Set up a development environment for SharePoint Add-ins on Office 365
There's also the option to join Office 365 Developer Subscription program (free), and get a 1 year long trial.
http://dev.office.com/devprogram
For debugging using the Online client, you'll have to change Start Action property for your project accordingly.
Create and debug Office Add-ins in Visual Studio
There is now a new way to test add-ins in the online Office clients. You can directly side-load your add-ins by loading your manifest file into your browser storage. This is achieved by going to Insert > Office Add-ins and then selecting Manage My Add-ins > Upload My Add-in (on the My Add-ins tab in the upper-right corner of the dialog).
Keep in mind this won't be as seamless as using an Office 365 Developer site or developer tenant with access to the app catalog if you are using Visual Studio to do a one-click deploy + test, because currently Visual Studio doesn't utilize this side-loading feature. But if you don't use Visual Studio or don't want to use a dev site/tenant, this is an easy way to test your add-ins in Office Online.
Try it out and let me know what you think of this feature!
To echo Massimo's answer above: Creating the O365 Dev Site is the easiest way to go. And, assuming you're using Visual Studio, the "Start Action" property will deploy the app for you into an Excel Online document (it's somewhat hidden, but super super handy!) You should even be able to hit breakpoints, if you set Internet Explorer in the "Start Action"!
For Word & PowerPoint online, or if you're not using VS, see Debug add-ins in Office Online
Note: If you're following the article above, a few clarifications regarding the localhost URL (step #2): For those who are using Visual Studio, rather than editing the XML manually, you can instead use the "publishing" functionality to get a ready-to-upload manifest. To do this:
To find out the URL that VS uses for locally running the add-in, the easiest way is via the Properties pane of the web project, looking at the SSL URL property
Continue following the article for the rest of the steps (and of course, make sure that the add-in is F5-ed from VS when you try out the add-in from Office online, to make sure that your site is running on localhost). Or use the same procedure as above, but slightly modified, to first publish to a free azure website, and point to that, instead.