We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26903
    • 1,336 Posts
    I have this working on my old WIN2K machine using XAMPP 1.6.1a and Netbeans 6.7.1 with the PHP plugins etc. As far as I can remember the setup worked OK for Netbeans, I already had Xdebug installed. Which area are you having problems with?

      Use MODx, or the cat gets it!
      • 3496
      • 101 Posts
      I have this working on my old WIN2K machine using XAMPP 1.6.1a and Netbeans 6.7.1 with the PHP plugins etc. As far as I can remember the setup worked OK for Netbeans, I already had Xdebug installed. Which area are you having problems with?
      I’m not really getting it working at all at the moment.

      I have set the right URL in Netbeans to start the site - and it works if I click on "Run Main project", but when I click on "Debug
      Main project" I get a browser window with a URL like "site-url/index.php?XDEBUG_SESSION_START=netbeans-xdebug" - endlessly waiting for a response.

      I use XAMPP 1.7.3 and Netbeans 6.8 - and MODx Revo (on Windows XP).

      In php.ini I put the following:
      zend_extension = "C:\Program Files\xampp\php\ext\php_xdebug.dll"
      xdebug.remote_enable=1
      xdebug.remote_handler=dbgp
      xdebug.remote_mode=req
      xdebug.remote_host=fyp2.nl
      xdebug.remote_port=9000

      Can you give me any pointers?
      Thanks!
        • 26903
        • 1,336 Posts
        Yes, your browsers installation of the Xdebug plugin( I use firefox but there are others) has a preferences option, this bit ’XDEBUG_SESSION_START=netbeans-xdebug’ in Netbeans needs to match the session parameter in your browser ie you need to set it to ’netbeans-xdebug’ so it will connect to the netbeans session. Then when you activate the Xdebug symbol in the browser it automatically appends the XDEBUG arg to your URL and connects to Netbeans. Hope this makes sense.

        You can use this method to connect to any xdebug compatible debugger.
          Use MODx, or the cat gets it!
          • 3496
          • 101 Posts
          Yes, your browsers installation of the Xdebug plugin( I use firefox but there are others) has a preferences option, this bit ’XDEBUG_SESSION_START=netbeans-xdebug’ in Netbeans needs to match the session parameter in your browser ie you need to set it to ’netbeans-xdebug’ so it will connect to the netbeans session. Then when you activate the Xdebug symbol in the browser it automatically appends the XDEBUG arg to your URL and connects to Netbeans. Hope this makes sense.

          Yes; thanks - that worked!
          (I now also changed the Netbeans PHP debug setting in NOT to stop at the first line - perhaps that was part of the problem)

          But now I’m stuck on the next step:

          So now I can debug the index.php and the home page - but when I go to a different page in my website - the debugging seems to stop (at least: it doesn’t stop at the breakpoint I gave - and I don’t see the "XDEBUG_SESSION_START=netbeans-xdebug" at the top anymore.

          Is this normal behavior or did I do something wrong?
          And if this is normal behavior; what is the best way to get the debugging going for other pages in my site?

          If I click on a PHP file I want to debug and click on debug I get a permission denied error - but of course Netbeans tries to get to the file by using the directory structure - and of course MODx’s URL’s aren’t supposed to work like that...

          Is there a way to get the debugging of a certain page working?
          Thanks!
            • 26903
            • 1,336 Posts
            If I click on a PHP file I want to debug and click on debug I get a permission denied error

            I don’t get this on windows, if I click on a file, lets say modrequest.class.php and then invoke debug from the pulldown menu, a firefox tab opens with the url
            ’http://localhost/revdev/core/model/modx/modrequest.class.php?XDEBUG_SESSION_START=netbeans-xdebug’

            Are you sure the user you are using with netbeans is the same one that owns the php files you are trying to debug? On linux my revo install is owned by my linux user although they are in the webroot, only things that apache needs to write to do I make writable for it. If the users don’t match you might get a perms error. The actual URL of course clearly nonsense as far as revo is concerned.

            What I do is pick a convenient debug point and insert a breakpoint in it, say line 51 of modrequesthandler(you can pick anywhere here BTW) For instance you can pick an external snippet in assets say and place a breakpointin that if thats what you are working on, it will break when the code is executed.

            The XDEBUG_SESSION_START=netbeans-xdebug is only appended for the first invocation, if you navigate away to another page ensure your Xdebug plugin helper is activated in your browser, this will always silently append the XDEBUG_SESSION_START line to the URL otherwise you’ll have to do it manually.

            This is kind of hard to explain without pictures. I might do a desktop record session over the weekend to show how I approach this with Netbeans.
              Use MODx, or the cat gets it!
              • 13370
              • 45 Posts
              I see that there are many Netbeans users here...
              Did any of you try it in Ubuntu Linux 9.10? Netbeans version is 6.7.1, and so far it works great for me, except the integrated subversion module. Problem is that Netbeans crashes every 2nd or 3rd time I commit changes. Anyone experienced the same?
                • 26903
                • 1,336 Posts
                Never seen this but I’ve not used Netbeans on Ubuntu, only windows, Centos5 and Fedora11/12, strange this is happening for you, have you tried the Ubuntu forums?
                  Use MODx, or the cat gets it!
                  • 2364
                  • 73 Posts
                  Quote from: Jacob at Apr 03, 2010, 01:38 AM

                  I see that there are many Netbeans users here...
                  Did any of you try it in Ubuntu Linux 9.10? Netbeans version is 6.7.1, and so far it works great for me, except the integrated subversion module. Problem is that Netbeans crashes every 2nd or 3rd time I commit changes. Anyone experienced the same?
                  I was using 6.8 on Kubuntu 9.10, now is 6.9M1 and never was crashes. Why you still using 6.7?
                    • 26903
                    • 1,336 Posts
                    I’m still using 6.5 on Fedora 11 as this is what comes supplied in the distro, looks like its 6.7.1 with Ubuntu 9.10.
                      Use MODx, or the cat gets it!
                      • 13370
                      • 45 Posts
                      Yes, 6.7.1 is the version in Ubuntu 9.10. Anyway, I googled a bit, and I am about to test by using Sun Java 6 instead of the default OpenJDK, there weas some suggestion that this can solve it.