{"id":4707,"date":"2018-10-11T18:37:09","date_gmt":"2018-10-11T18:37:09","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2018\/10\/11\/how-to-install-xdebug-for-your-php-application\/"},"modified":"2021-08-16T22:24:26","modified_gmt":"2021-08-17T02:24:26","slug":"how-to-install-xdebug-for-your-php-application","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/website\/how-to-install-xdebug-for-your-php-application\/","title":{"rendered":"How to Install Xdebug for Your PHP Application"},"content":{"rendered":"<p>Bugs running amok in your PHP application? Xdebug is a <em>free program<\/em> that helps you debug your PHP application. So you can spend more time coding and less time searching through thousands of lines of code for one little bug. Xdebug is highly powerful and highly performant and allows you to get more detailed information about where your program is failing.<\/p>\n<p>We\u2019ll show you how you can make your development more efficient and more enjoyable by installing and using Xdebug. Here\u2019s the path we\u2019re going to follow:<\/p>\n<ul>\n<li>Download Xdebug.<\/li>\n<li>Use our PHPInfo page to help install Xdebug.<\/li>\n<li>Add Xdebug files to our local development environment.<\/li>\n<\/ul>\n<p>And that\u2019s just about all we\u2019re going to need to do. Follow along below and let\u2019s get started.<\/p>\n<p>Of course you\u2019ll want to make sure you have a local development environment. If you\u2019re using Linux, you can always use the traditional LAMP stack. If you\u2019re using Mac this will be MAMP, and<\/p>\n<h2 id=\"whydoyouneedthis\">Why do you need this?<\/h2>\n<p>Honestly, you don\u2019t need to install Xdebug. But, if you do a great deal of PHP coding, it\u2019s sure to make a lot of work easier. As the documentation says:<\/p>\n<blockquote class=\"blockquote\"><p><em>\u201cXdebug\u2019s basic functions include the display of stack traces on error conditions, maximum nesting level protection and time tracking.\u201d<\/em><\/p><\/blockquote>\n<p>With more informatin available to you (and your team, if you have one) means that you can more quickly and easily identify bugs that have got you stumped.<\/p>\n<p>Here\u2019s a comparison image of an error with Xdebug on and off:<\/p>\n<p><img decoding=\"async\" style=\"width: auto;\" title=\"Xdebug image\" src=\"\/support\/images\/stories\/stack-trace.png\" alt=\"Xdebug comparison error\"> <small>Source: <a href=\"https:\/\/github.com\/Varying-Vagrant-Vagrants\/VVV\/wiki\/Code-Debugging\">Github<\/a><\/small><\/p>\n<p>You could one has a single line while the other gives a detailed stack trace.<\/p>\n<h2 id=\"howtoinstallit\">How to Install It?<\/h2>\n<p>First, you\u2019ll need to download the appropriate files for the Xdebug version you want. You can do this from the <a href=\"https:\/\/xdebug.org\/download.php\">Xdebug download page<\/a>.<\/p>\n<p>Then, proceed by following the steps below:<\/p>\n<ol class=\"article_list\">\n<li>Go to the <a href=\"https:\/\/xdebug.org\/wizard.php\">Xdebug wizard page<\/a><\/li>\n<li>Paste the contents of your PHPInfo page here<\/li>\n<li>Click the button under the field to start the parsing processs<\/li>\n<\/ol>\n<p>Now, Xdebug will analyse your PHP information and provide you with a file path to place the Xdebug executables.<\/p>\n<h2 id=\"puttingitalltogether\">Putting It All Together<\/h2>\n<p>As you proceed, here are a few resources you should check out from our Support Center:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.inmotionhosting.com\/support\/website\/how-to-create-a-phpinfo-page\/\">How do I create a PHPInfo file?<\/a><\/li>\n<li><a href=\"\/support\/website\/troubleshoot-php-errors\/\">Where is my PHP Error Log?<\/a><\/li>\n<li><a href=\"https:\/\/xdebug.org\/docs\/basic\">Xdebug Full Documentation<\/a><\/li>\n<\/ul>\n<p>And as always, be sure to leave a comment or question if you have one. We always appreciate feedback.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Bugs running amok in your PHP application? Xdebug is a free program that helps you debug your PHP application. So you can spend more time coding and less time searching through thousands of lines of code for one little bug. Xdebug is highly powerful and highly performant and allows you to get more detailed information<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/website\/how-to-install-xdebug-for-your-php-application\/\"> Read More ><\/a><\/p>\n","protected":false},"author":17,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4288],"tags":[],"class_list":["post-4707","post","type-post","status-publish","format-standard","hentry","category-website"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Install Xdebug for Your PHP Application | InMotion Hosting<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/website\/how-to-install-xdebug-for-your-php-application\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install Xdebug for Your PHP Application | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"Bugs running amok in your PHP application? Xdebug is a free program that helps you debug your PHP application. So you can spend more time coding and less time searching through thousands of lines of code for one little bug. Xdebug is highly powerful and highly performant and allows you to get more detailed information Read More &gt;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/website\/how-to-install-xdebug-for-your-php-application\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-10-11T18:37:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-17T02:24:26+00:00\" \/>\n<meta name=\"author\" content=\"Christopher Maiorana\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Christopher Maiorana\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/how-to-install-xdebug-for-your-php-application\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/how-to-install-xdebug-for-your-php-application\/\"},\"author\":{\"name\":\"Christopher Maiorana\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/c6922c56c84e17079fd558e07b7ef72f\"},\"headline\":\"How to Install Xdebug for Your PHP Application\",\"datePublished\":\"2018-10-11T18:37:09+00:00\",\"dateModified\":\"2021-08-17T02:24:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/how-to-install-xdebug-for-your-php-application\/\"},\"wordCount\":423,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"articleSection\":[\"Website\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/website\/how-to-install-xdebug-for-your-php-application\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/how-to-install-xdebug-for-your-php-application\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/website\/how-to-install-xdebug-for-your-php-application\/\",\"name\":\"How to Install Xdebug for Your PHP Application | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2018-10-11T18:37:09+00:00\",\"dateModified\":\"2021-08-17T02:24:26+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/how-to-install-xdebug-for-your-php-application\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/website\/how-to-install-xdebug-for-your-php-application\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/how-to-install-xdebug-for-your-php-application\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install Xdebug for Your PHP Application\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/c6922c56c84e17079fd558e07b7ef72f\",\"name\":\"Christopher Maiorana\",\"description\":\"Christopher Maiorana joined the InMotion community team in 2015 and regularly dispenses tips and tricks in the Support Center, Community Q&A, and the InMotion Hosting Blog.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/chris-m-4623144b\/\"],\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/christopherm\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install Xdebug for Your PHP Application | InMotion Hosting","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.inmotionhosting.com\/support\/website\/how-to-install-xdebug-for-your-php-application\/","og_locale":"en_US","og_type":"article","og_title":"How to Install Xdebug for Your PHP Application | InMotion Hosting","og_description":"Bugs running amok in your PHP application? Xdebug is a free program that helps you debug your PHP application. So you can spend more time coding and less time searching through thousands of lines of code for one little bug. Xdebug is highly powerful and highly performant and allows you to get more detailed information Read More >","og_url":"https:\/\/www.inmotionhosting.com\/support\/website\/how-to-install-xdebug-for-your-php-application\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2018-10-11T18:37:09+00:00","article_modified_time":"2021-08-17T02:24:26+00:00","author":"Christopher Maiorana","twitter_card":"summary_large_image","twitter_creator":"@InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"Christopher Maiorana","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/how-to-install-xdebug-for-your-php-application\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/how-to-install-xdebug-for-your-php-application\/"},"author":{"name":"Christopher Maiorana","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/c6922c56c84e17079fd558e07b7ef72f"},"headline":"How to Install Xdebug for Your PHP Application","datePublished":"2018-10-11T18:37:09+00:00","dateModified":"2021-08-17T02:24:26+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/how-to-install-xdebug-for-your-php-application\/"},"wordCount":423,"commentCount":0,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"articleSection":["Website"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/website\/how-to-install-xdebug-for-your-php-application\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/how-to-install-xdebug-for-your-php-application\/","url":"https:\/\/www.inmotionhosting.com\/support\/website\/how-to-install-xdebug-for-your-php-application\/","name":"How to Install Xdebug for Your PHP Application | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2018-10-11T18:37:09+00:00","dateModified":"2021-08-17T02:24:26+00:00","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/how-to-install-xdebug-for-your-php-application\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/website\/how-to-install-xdebug-for-your-php-application\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/how-to-install-xdebug-for-your-php-application\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to Install Xdebug for Your PHP Application"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/c6922c56c84e17079fd558e07b7ef72f","name":"Christopher Maiorana","description":"Christopher Maiorana joined the InMotion community team in 2015 and regularly dispenses tips and tricks in the Support Center, Community Q&A, and the InMotion Hosting Blog.","sameAs":["https:\/\/www.linkedin.com\/in\/chris-m-4623144b\/"],"url":"https:\/\/www.inmotionhosting.com\/support\/author\/christopherm\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":null,"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/4707","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=4707"}],"version-history":[{"count":2,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/4707\/revisions"}],"predecessor-version":[{"id":83590,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/4707\/revisions\/83590"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=4707"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=4707"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=4707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}