The execution stops at the breakpoint (that was hopefully supposed to be executed) and you have access to a wealth of contextual information. After setting it up, all you have to do is place a breakpoint in your code and load your site page. But more on that in the next point.Īs great as the Devel module is for printing out variables to the screen, it does not come close to Xdebug when we talk about debugging. Integrating PHPStorm with XDebug on my local server really changed things around. And not to mention the integrations you can create with these API documentation resources.Īnother great use of IDEs (which for me is the most important) is debugging. The IDE great reduces the time you spend online researching these APIs. Since Drupal 7 is mostly procedural you need to be aware of many functions and parameters. And with Drupal, all of these are important. I myself use PHPStorm and is of great help.Īn IDE can speed up your development time by preventing code mistakes, highlighting syntax for great readability, code hinting for classes and functions in your project and many others. Luckily nowadays we don't have to suffer through that as we can use IDEs for coding. I mentioned before the good ol' times (not really) when Notepad was the editor of choice for many developers. This goes behind development and can help with maintenance or even production jobs that need to run with cron. This way, you can expose some of your custom functionality to the command line. And if you are looking for some help with setting Drush up on your server, you can read this article I wrote on the subject.Īnother great thing about Drush is that aside from all the awesome core commands, you can declare your own. This great list of core commands can give you an overview of what you can do with Drush. You can download and enable/disable/uninstall/update modules or Drupal core and all sorts of other helpful jobs. Some people call it the swiss army knife of Drupal and you can't really argue the opposite.ĭrush allows you to perform a host of Drupal tasks from the command line. So it's a must have on any Drupal development environment.ĭrush is an awesome command line tool for Drupal that speeds up many tasks. Additionally, you can use it to execute PHP code in the Drupal environment, switch between users on the site and other awesome functionality. Sometimes you need 500 nodes on the site to test something out. It has a series of submodules that can generate nodes, taxonomy terms, users and more. And they are not the only ones.Īnother great use for the Devel module is content generation. Using Devel's dsm(), dpm(), and krumo()functions in your code you can print out arrays, objects and whatever you need for a great overview of what you have in scope at that moment of execution. These modules are probably the first solution for debugging variables in Drupal. And if you know Drupal 7, it is all about big arrays. Search Krumo is yet another cool module that plugs into it in order to give us a hand with navigating through huge array structures. That's for you to explore after I give you a taste of what they can offer.ĭevel is the most used Drupal development module built for aiding with debugging code, generating content and all sorts of other dev tasks. I will say a few words about each, but I can't go into all of their features. So here we are, I guess in order of complexity, the 4 tools in my belt when I run vagrant upto spin up a project on my local environment. But if you are, kudos, do share some of your experiences that further demonstrate their power. And I can guarantee you that if you are serious about Drupal development and you are not using them, you are missing out. I heavily rely on them to minimise frustration, increase productivity and lower development time. In this article I would like to share with you 4 tools that I use for Drupal development. I mean, remember when we were writing PHP in Notepad and that one missing semicolon added 2 hours of debugging that day? But in all honesty, the more you work with it, the more you develop this love/hate relationship with all the quirks of Drupal development.īut one thing is certain, and this is applicable to other areas of web development as well: the tools you use for the job can make a big difference in the experience you have. However, Drupal is fostered by a big community of enthusiastic people who love it, myself included. Men and women of PHP who work with other frameworks and applications most likely find it even more cumbersome to understand. And this comes from those who call themselves Drupal developers. Developing Drupal sites can be quite a challenge and adventure.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |