Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Alfresco 3 Cookbook

You're reading from   Alfresco 3 Cookbook Over 70 recipes for implementing the most important functionalities of Alfresco

Arrow left icon
Product type Paperback
Published in Jul 2011
Publisher Packt
ISBN-13 9781849511087
Length 380 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Toc

Table of Contents (21) Chapters Close

Alfresco 3 Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Getting Started 2. Creating and Organizing Contents FREE CHAPTER 3. Securing and Searching Contents 4. Rules—the Smart Spaces 5. Alfresco Administration Console 6. Customizing Alfresco Web Client 7. Alfresco Content Model 8. Alfresco JavaScript API 9. FreeMarker Templates 10. Web Scripts 11. Working with Workflows 12. Integrating with MS Outlook and MS Office 13. Configuring Alfresco E-Mail and File Servers 14. Building Alfresco Index

Debugging Alfresco JavaScript


As you have seen, using Alfresco JavaScript you write scripts which execute in your server, not at your client browser end. You cannot write user interactive JavaScript code such as alert, inputbox, and so on. As a developer, this makes things a bit complex in terms of debugging and troubleshooting your code.

However, Alfresco comes to your rescue yet again.

There are two ways to debug your code.

  1. 1. Using the Logging API:

    Like other root level APIs, Alfresco provides a logger object which exposes two methods to log your debug code in your console logger.

    • isLoggingEnabled: This helps to identify whether console logging is enabled or not. By default, it is disabled.

    • log: You pass your log string value into this method. And if logging is enabled, you get your messages logged in console output.

  2. 2. Using the JavaScript Debugger:

    This is another advanced user interface Alfresco offers for debugging, which allows step-by-step execution and debugging in the JS code.

    Note

    It...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image