Sunday, October 28, 2012

KDevelop XDebug - PHP Debugger Beta Release

It has been a pretty long time since the first beta release of XDebug. I picked up the plugin again and adapted it to work for the current version of KDevelop.
To get it working you need:
  • Php + xdebug extension
  • xdebug configured to accept remote connections
    • xdebug.remote_enable = 1
    • xdebug.remote_host = localhost (yourhost if on remote server)
  • KDevplatform 1.4, KDevelop 4.4
  • The following KDevelop Plugins: 
    • kdev-executebrowser
    • kdev-xdebug

Configuring and using the debugger didn't change, use steps described in my last blog post


And for the future: yesterday we merged the unittests branches Miha Čančula wrote - and guess what: you can debug PHPUnit tests using xdebug.

14 comments:

  1. Hi, I'm getting a segfault when I try to run kdevelop with xdebug enabled:
    Thread 1 (Thread 0x7f42d66bf760 (LWP 9061)):
    [KCrash Handler]
    #5 0x00007f42d5e0d770 in KDevelop::IPlugin::extensions() const () from /usr/lib/libkdevplatforminterfaces.so.6
    #6 0x00007f42b3f0107a in extension (this=0x0) at /usr/include/kdevplatform/interfaces/iplugin.h:183
    #7 XDebug::XDebugPlugin::XDebugPlugin (this=0x3b55520, parent=) at /home/christopher/src/kdev-xdebug-1.3.80/xdebugplugin.cpp:99
    #8 0x00007f42b3f013c7 in KPluginFactory::createInstance (parentWidget=, parent=, args=...) at /usr/include/kpluginfactory.h:477

    ReplyDelete
    Replies
    1. This assert happens if the kdev-executebrowser plugin isn't loaded. Which is strange because it is a build time dependency and so should be installed.

      Start kdebugdialog, check kdevplatform (shell) and start kdevelop from an console. There you'll see the plugins getting loaded.

      Delete
    2. That's exactly the issue. It builds without issue and the files are located in the exact same directories as the kdev-xdebug files. Any idea why that might be?

      Delete
    3. - did you run kbuildsyscoca4?
      - watch the output as I've written above (there might be a mismatch of X-KDevelop-Version in desktop files)

      Delete
  2. I downloaded the modules, ran:

    cmake .
    make
    su
    ...
    make install

    On each of them, executebrowser first. And all that ran without problems but I can not get the plugins loaded on Kdevelop. I have linked the libs to /usr/lib/kde4 and the .desktop files to /usr/share/kde4/services but it does not work. Also ran "kbuildsyscoca4 --noincremental" multiple times.

    Also edited the .desktop files and changed K-KDevelop-Version to 15.

    How can I get this module working? I'm running KDevelop on Debian sid from the repos. Current version is 4.5.1 with kdevplatform 4.10.5.

    Thanks.

    ReplyDelete
    Replies
    1. please check if you are using the correct X-KDevelop-Version by using the same as eg. share/kde4/services/kdevsnippet.desktop

      And then start kdebugdialog, check "kdevplatform (shell)" and restart kdevelop in a console and watch the output. It should output all loaded plugins or errors. You can also post the output here or ask for help on irc in #kdevelop channel.

      Delete
    2. Yes, that's what I did and that's why I was using that value.

      However, since its been a while, today I rebuild the plugins and they are working now! (after symlinking, changing K-KDevelop-Version to 15 and running "kbuildsyscoca4 --noincremental"), They appear in the "Others" section.

      Thanks a lot!

      Delete
    3. A recent commit to kdevplatfrom makes this much simpler - the version number is now set automatically according to the kdevplatform version the plugin was complied against.

      Delete
    4. Not True.

      Kdevelop was updated to 4.7.0 on Debian unstable so I had to install this plugins again, the value of K-KDevelop-Version on .desktop files still was 14, had to change them to 17.

      Seems to be working fine now.

      Thanks.

      Delete
  3. Hello,
    I fail to see the plugins in kdevelop v 4.5.1

    The version is 1.5.1 KDevelop Platform
    Using KDE Development Platform 4.11.5

    The system is kubuntu 13.10
    Install xdebug with pecl.
    The plugins install them without problems.

    I could help you find what is the problem?

    Thank you.
    PD: Sorry for my English

    ReplyDelete
  4. 17 months after the last comment... KDevPlatform 1.7
    running Arch Linux and Plasma 5

    I'd like to be able to use this plugin

    is it still maintain?

    thanks

    ReplyDelete
  5. Thanks a lot with regards to Amazing and in addition Valuable Submit. This article can be quite comprises of much bigger facts with regards to This particular Make any difference.nimble phone number

    ReplyDelete
  6. Above all the points to consider to choose my new domain time. I get it clear idea website design topic. It's really helpful to improve my web hosting knowledgeAndroid Phone Applications

    ReplyDelete
  7. Thanks for sharing such an informative article. I really enjoyed it. Please visit https://goo.gl/TwgDjZ

    ReplyDelete