GGshow reloaded GGshow reloaded

April 3, 2012

Debugging PHP application with Netbeans, Xdebug, and Chromium (or Google Chrome) in Ubuntu

  1. Requirements:
    Firstly, we must have Netbeans, Xdebug, Chromium (or Google Chrome) installed.How to check if Xdebug installed?

    user@ubuntu:~$ php -v
    PHP 5.3.6-13ubuntu3.6 with Suhosin-Patch (cli) (built: Feb 11 2012 02:17:16)
    Copyright (c) 1997-2011 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
        with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans
  2. Install Xdebug helper extension
    Visit this URL using Chromium (or Google Chrome).
    Press [Add To Chrome] button to install the Xdebug helper extension.
  3. Configure Xdebug helper options
    Under Chrome extensions, Xdebug helper, press Options.
    Select Netbeans for IDE key.
    Add domains to the domain filter whitelist.
  4. Configure Netbeans
    Tools > Options > General > Web Browser, press [Edit] button.
    Press [Add] button to add a new browser, set configuration as below:Process:
    -remote “{URL}” –user-data-dir=~/.cache/chromium
    -remote “{URL}” –user-data-dir=~/.cache/google-chrome[OK]

    Ubuntu Netbean Chromium Debugging

  5. Debugging
    You can now debug a project (Ctrl+F5) or debug a file (Ctrl+Shift+F5)

    Ubuntu Netbean Chromium Debugging

    To control debugger session
    Finish Debugger Session (Shift+F5)
    Continue (F5)
    Step Over (F8)
    Step Into (F7)
    Step Out (Ctrl+F7)
    Run to Cursor (F4)
    or use the buttons in Debug Toolbar

Filed under: Web,Web Browsers — Tags: , , , , , — GG @ 12:08 pm

No Comments »

No comments yet.

RSS feed for comments on this post.

Leave a comment

© 2024 GGSHOW | Powered by WordPress