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.

33 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
  8. its a great tool and we have used it in the past for some of our projects and it was quiet useful.
    Web Development Company in New York

    ReplyDelete
  9. Beta version which you have shared within this post, could be really informative and useful to get it for the php debug. Thank you very much. best e-commerce service provider | kovai web solutions

    ReplyDelete
  10. ROE in Japan

    Much thanks to you for sharing this significant information. These post will truly enable me improve my career.

    ReplyDelete
  11. Very informative post . Thanks for sharing this . I really appreciate it .

    web design

    ReplyDelete
  12. THANK YOU FOR THE INFORMATION .HI GUYS IF YOU SEARCHING FOR Web designing company in Bangalore

    PLEASE VISIT US
    Web designing company in Bangalore

    ReplyDelete
  13. Such a great job.. your article is very nice.. and very helpful for me and my team..

    My name is Yogesh Gaur, lives in Delhi, India. Hey everyone, I am a Digital blogger that writes for Google and SEO updates. You can check my blogs at my website. If talking personally, I like listening music and optimizing the content for various Search engines like Bing and Google. Digital Marketing Tips

    ReplyDelete
  14. This comment has been removed by the author.

    ReplyDelete
  15. Such a great job.. your article is very nice.. and very helpful for me and my team..
    You Can Check My Website for more information.
    Best Digital Marketing Company In hyderabad

    ReplyDelete
  16. thanks for posting this information | http://www.digitaleyecon.com

    ReplyDelete
  17. The blog is very useful and informative which provides great information and I really loved it. ms-azure

    ReplyDelete
  18. Yogesh Gaur is the famous digital marketing consultant based in New Delhi. I usually gives digital marketing techniques in order to rank higher in search engines.I write blogs on social media marketing,email marketing,search engine optimization,content marketing and much more.I usually give tips and tricks to money online.To know more visit at:

    Local business listing sites usa
    Forum posting sites 2018
    high pr ping submission sites
    Business listing sites uk

    ReplyDelete
  19. This blog is very interesting the content of this blog is very great. In this blog i have learn many interesting things and things in the blog is unique. I learned lot of new things from this blog. https://developerguidance.com/ provides free tutorias on Ajax, bootstrap, jQuery,php, MySQL etc it has a great wordpress work done.
    Wordpress is used very well in https://developerguidance.com/ I recommend every one to check https://developerguidance.com/ here you will find best ecommerce platform how to sell your product online, how to use linkedin for marketing your business, promote your business in LinkedIn, how to use Instagram to increase traffic to your website. Interface of https://developerguidance.com/ is user friendly. https://developerguidance.com/ is an best example of digital marketing as you can advertise your products and learn various tutorial through website digitally.

    ReplyDelete
  20. Melbourne Collagen Injections - Bioscor International

    Collagen is an important element for maintaining the skin’s health and its lack of production can lead to signs of ageing. This is where collagen injections come to your rescue. Bioscor help you with any doubts or queries. Simply contact us at (03) 9544 7429 to get more details.

    For more Details Visit our Website : melbourne collagen injections

    ReplyDelete