IDE feedback and Xdebug tutorial?

IDE feedback and Xdebug tutorial?

35
Basic UserBasic User
35

    May 23, 2012#1

    Been a very happy user of UE for years. Looking for an IDE for Joomla development and thought I would examine UES first.

    Would appreciate any feedback from IDE users: my searches lead me to suspect that UES is rarely on the radar for PHP IDE.
    1) Is this because it is not competitive re: features?
    2) Is there a tutorial anywhere on using UES for PHP debugging? Didn't find much in doc or in searches.
    3) Is there a way to see variables other than $variables? e.g. the first 2 lines of the joomla index.php file:
    define('_JEXEC', 1);
    define('DS', DIRECTORY_SEPARATOR);
    Is there a way to see the value of _JEXEC and DS in UES locals window or watch window during debugging?
    4) Is there a way to create a keyboard shortcut for the debug buttons on the toolbar e.g. Step Into?
    5) Any thoughts on why there are so few posts on the UES forum? It looks like my post is the first one in IDE for almost a year...
    small user base? Customers defecting to other products?

    With Regards-
    Sam

    2362
    MasterMaster
    2362

      May 24, 2012#2

      I've been using UES for PHP development using CodeIgniter, SMF Forum Development, and other application work, for several years now. Nothing in the past year, as I've actually been working on Desktop applications for Windows, but I'll be picking up PHP again as I finish some of my current workload. As a freelancer, it pays for me to have more than one area of expertise.

      Most people who are looking for PHP IDE are looking for a few basic necessities, as a vast majority of people who call themselves "web developers" are not old-school programmers, but are breaking into it because they believe it would be a lucrative career choice.

      These basic necessities include:
      1. Must run on Linux - because they can get the Operating System, Development Server, etc. for free that way, and they believe that since most web servers running PHP run on Linux, you must have to have Linux to develop PHP. This, as any real programmer that has done their homework knows, is bogus.
      2. Needs to be a "multi-platform" IDE - because you never know when you'll run into issues on how to properly use your IDE, and you'll need to ask your Windows or Mac friends how to do something.
      3. Has to be free - because, how can you make money if you're always having to pay for stuff?

      I have seen those necessities iterated so many times (without the sarcasm, because they are serious) that it just isn't funny. Look on the radar for PHP IDE's, and you'll find pretty much every one of them is a freebie, except for Zen Studio, which is pretty much a PHP IDE as well. Personally, I want something that is as powerful on JavaScript, HTML, XML, C, .NET, Java, and a few other languages as it is for PHP. That's where most other IDE's fall apart, and that's where UEStudio shines out. When you program PHP, you don't just program PHP. Many of these people use one product for the PHP part, and another for HTML, and another for their JavaScript. It's crazy.

      When it comes right down to it, I have yet to find functionality that I would actually use in another IDE that UES doesn't implement just as well or better. Different perhaps, but usually that's a good thing.

      Almost all of these developers use an Eclipse based IDE, or something that runs on Java or .NET. These IDEs, when dealing with a large project (or just the Joomla core) slow to a crawl. It's pathetic. I just wasn't able to get any work done with any of them, and I had tried them all. Makes me glad I'm using Windows XP.

      I'll try to answer some of those issues you posted, but I may not be the best one to answer some of them, and I'll say so on those issues.

      1) It's not that UES is not competitive on features. If you compare a full list of features, you'll see that in most cases it's the other product that isn't competitive on features with UES.
      2) See the following: Configure UEStudio's integrated PHP Debugger
      3) Those "define" statements are for constants. They are not variables. The values of a constant does not change, so there is no need to "watch" it. So I've never tried. There is no need. If those are being "re-defined", then the PHP platform is practicing VERY bad practice. Constants should, as a rule, never be redefined.
      4) You can map keys and create keyboard shortcuts for pretty much anything UES does, period. You can create custom toolbar buttons as well. See Configure custom keymapping and menu hotkeys in UEStudio
      5) This is one that takes a little explaining, but I can definitely tell you why. It will be long winded, as I usually am. You can decide to read it or skip it if you like.

      An auto mechanic takes time to learn how to properly use the tools they have, and they become familiar with how to use the repair manuals on hand.

      A Doctor can't simply learn from a book, they have to have practical experience in using the "tools" of the trade. They need to know which instrument to use for which part of the surgery, how that instrument works, and what the differences are between different types of scalpel blades, surgical silk threads, clamps, etc.

      In the same way, a programmer must know their tools. If you have a powerful IDE, it makes no sense to use it and not know its potential. Serious, hard-core programmers know this. Generally, those are the kind of programmers that buy UEStudio, as fly-by-night programmers which outnumber hard-core programmers by 1000 to 1, will use a free software alternative.

      Those who want to get to know their tools will spend time studying it, read the manual, and test out the different functions to see what it can do for them. The time spent on it will increase their productivity to the point to pay for the time spent in the long run. Personally, I spent a good 40 hour work week getting up to speed when I switched from UE to UES a few years ago, and I'm still learning about features and the inner workings of it. It has made me more productive.

      That's not to say it takes a 40 hour work week to learn how to use it, just that I wanted to play with it that much to see what all it could do. I was home on a 6 week vacation at the time, and it seemed a perfect time to do so.

      35
      Basic UserBasic User
      35

        May 24, 2012#3

        Thanks for taking the time to give such a thorough reply and locating the links. Much appreciated.

        As followup and clarification to earlier points:

        2) Thanks for the link re: configuring. I am looking for info on the debugging aspect e.g. the registers window (total sum of doc on this topic is "displays the Registers window to view registers"). Or whether I can change the next line to be executed. Or whether there is a way to evaluate an expression (seems like there is no "immediate window"). Or what that green circle on the tab means...

        3) I am looking for a way to display the value of the constants. e.g. when a statement uses one of those constants, I don't want to have to search the code to find its value. The Joomla index.php file "includes" 24 .php files for a total of 25 files... locating the "define" statement for a constant can be time consuming.

        4) The debug submenu of the build menu is not listed in keymapping, hence my question ; )

        I appreciate your input - it makes me feel more comfortable that UES compares favorably in the IDE arena. Thanks--

        2362
        MasterMaster
        2362

          May 24, 2012#4

          SAbboushi wrote: 2) Thanks for the link re: configuring. I am looking for info on the debugging aspect e.g. the registers window (total sum of doc on this topic is "displays the Registers window to view registers"). Or whether I can change the next line to be executed. Or whether there is a way to evaluate an expression (seems like there is no "immediate window"). Or what that green circle on the tab means...
          The Registers Window is not available when debugging PHP. The reason for this is that a registers window is not useful for a scripting language which does not compile. A PHP programmer needs to be more concerned with variables and expressions than registers, as what registers will be used will be changing depending on the platform your PHP script is run on. Therefore, it is meaningless to use the registers window. If other PHP IDEs are using this, then it is a gimmick to say, "look what we can do that others cannot", which is pointless.

          You can evaluate expressions in the Watch window. The link I gave you for configuring tells you at the bottom that you have the Call stack window, Variables window, and the Watch window available for PHP debugging. It also provides a link to the UEStudio Integrated Debugger Tour which will explain how to use what is available.

          The green circle on the file tab means you have modified and then saved the file.
          SAbboushi wrote: 3) I am looking for a way to display the value of the constants. e.g. when a statement uses one of those constants, I don't want to have to search the code to find its value. The Joomla index.php file "includes" 24 .php files for a total of 25 files... locating the "define" statement for a constant can be time consuming.
          I would assume that you can evaluate constants in the Watch window, though I've never tried.
          SAbboushi wrote: 4) The debug submenu of the build menu is not listed in keymapping, hence my question ; )
          Commands available for debugging in the Key Mapping are:
          DebugGo
          DebugRestart
          DebugStopDebugging
          DebugBreak
          DebugStepInto
          DebugStepOver
          DebugStepOut
          DebugRunToCursor
          DebugToggleBreakpoint
          ViewDebugWatch
          ViewDebugCallStack
          ViewDebugMemory
          ViewDebugDisassembly
          ViewDebugRegisters
          ViewDebugVariables

          If you check the "Sort" button, you will be able to find them by scrolling to "Debug*" and "ViewDebug*". Those cover all of the debug submenu, and are certainly listed in the keymapping. Just takes some searching, or knowing where to look.

          35
          Basic UserBasic User
          35

            May 24, 2012#5

            re: Key Mapping and Debug submenu: my bad! Thanks for the hand holding Rhapdog

            I appreciate you taking the time to help me.

            BTW: Ben at IDM confirms that it is not possible to see the value of constants in the variable window.

            Sam

              May 29, 2012#6

              SAbboushi wrote:3) Is there a way to see variables other than $variables? e.g. the first 2 lines of the joomla index.php file: define('_JEXEC', 1); define('DS', DIRECTORY_SEPARATOR); Is there a way to see the value of _JEXEC and DS in UES locals window or watch window during debugging?
              UES 12 uses a later version (ues_ctags.exe) of Exuberant's Ctags for the ClassViewer. ClassViewer displays most of the constants and their values, e.g.

              _JEXEC (1)
              DS (DIRECTORY_SEPARATOR)

              Just what I was looking for. ...except:
              a) I don't know why these global constants are listed under the Globals MACROS section??
              b) ues_Ctags.exe misses constants that are declared within if statements
              c) ues_Ctags.exe also misses global variables

              For example:

              Code: Select all

              <?php
              define('_JEXEC', 1);
              if (!defined('_JDEFINES')) {
              	define('JPATH_BASE', dirname(__FILE__));
              }
              define('_JEXEC', 1);
              $thisVariable1 = _JEXEC;
              define('DS', DIRECTORY_SEPARATOR);
              ?>
              ClassViewer displays:

              Globals
              ..# Macros
              ... # _JEXEC (1)
              ... # DS (DIRECTORY_SEPARATOR)

              JPATH_BASE (b) and $thisVariable1 (c) are not displayed anywhere in ClassViewer. And again, why constants in Macros section?

              Since Exuberant's software is creating the tag list, I suspect IDM can't do much about this...

              But I sure am starting to appreciate what UES has to offer!

              And even better: ClassViewer has an entry for each different value that a constant is set to (good to point out those very bad coding practices rhapdog was referring to):

              Code: Select all

              Globals
              ..# Macros
               ... # _JEXEC (1)
               ... # _JEXEC (2)

              20
              Basic UserBasic User
              20

                Dec 11, 2017#7

                rhapdog wrote:I've been using UES for PHP development using CodeIgniter, SMF Forum Development, and other application work, for several years now.  Nothing in the past year, as I've actually been working on Desktop applications for Windows, but I'll be picking up PHP again as I finish some of my current workload.  As a freelancer, it pays for me to have more than one area of expertise.

                Most people who are looking for PHP IDE are looking for a few basic necessities, as a vast majority of people who call themselves "web developers" are not old-school programmers, but are breaking into it because they believe it would be a lucrative career choice.  

                When it comes right down to it, I have yet to find functionality that I would actually use in another IDE that UES doesn't implement just as well or better.  Different perhaps, but usually that's a good thing.

                An auto mechanic takes time to learn how to properly use the tools they have, and they become familiar with how to use the repair manuals on hand.  

                A Doctor can't simply learn from a book, they have to have practical experience in using the "tools" of the trade.  They need to know which instrument to use for which part of the surgery, how that instrument works, and what the differences are between different types of scalpel blades, surgical silk threads, clamps, etc.  

                In the same way, a programmer must know their tools.  If you have a powerful IDE, it makes no sense to use it and not know its potential.  Serious, hard-core programmers know this.  Generally, those are the kind of programmers that buy UEStudio, as fly-by-night programmers which outnumber hard-core programmers by 1000 to 1, will use a free software alternative.  

                Those who want to get to know their tools will spend time studying it, read the manual, and test out the different functions to see what it can do for them.  The time spent on it will increase their productivity to the point to pay for the time spent in the long run.  Personally, I spent a good 40 hour work week getting up to speed when I switched from UE to UES a few years ago, and I'm still learning about features and the inner workings of it.  It has made me more productive.

                That's not to say it takes a 40 hour work week to learn how to use it, just that I wanted to play with it that much to see what all it could do.  I was home on a 6 week vacation at the time, and it seemed a perfect time to do so.
                I seriously doubt that I could have expressed the sentiment more clearly than you did. As a fellow serious freelance developer, I agree 100% with your analogies. Unfortunately, today's cutthroat market is such that the fly-by-night programmers can and do undercut us left and right, and it's harder and harder to find people who can see past their superficially lower price. IMO, in the end, it's worth paying more for the experience and dedication of a seasoned professional.

                I was very gratified when I stumbled across an article about integrating a Java compiler into UltraEdit (or even UEStudio, perhaps?). Until the last few weeks, I wasn't aware of anything that made UEStudio intrinsically better suited to the kind of work that you and I do. However, a recent inquiry to IDM about using UltraEdit with XDebug introduced me to the reason, and I'll be upgrading my license to all access this week. I'm already using UEStudio under a trial license, and I am very impressed. I've already shown that it can handle scripts running on my WAMP stack, and I am working right now on a greenfield script that runs in the PHP command line interface. That one is a command line parser for Apache access and error logs.