[{"data":1,"prerenderedAt":120},["ShallowReactive",2],{"news-item-\u002Fnews\u002Fdebug-cakephp-trong-vscode-voi-xdebug":3},{"id":4,"title":5,"body":6,"category":107,"created by":108,"date":109,"description":110,"extension":111,"meta":112,"navigation":113,"path":114,"sections":115,"seo":116,"stem":117,"thumbnail":118,"__hash__":119},"content_en\u002Fnews\u002Fdebug-cakephp-trong-vscode-voi-xdebug.md","Debug CakePHP in VSCode with Xdebug",{"type":7,"value":8,"toc":101},"minimark",[9,14,48,52,63,73,78,82,87,92,97],[10,11,13],"h3",{"id":12},"_1-introducexdebug","1. Introduce Xdebug",[15,16,17,21,32,45],"ul",{},[18,19,20],"li",{},"Xdebug is an extension for PHP to assist with debugging and development. It contains a single step debugger to use with IDEs; it upgrades PHP's var_dump() function; it adds stack traces for Notices, Warnings, Errors and Exceptions; it features functionality for recording every function call and variable assignment to disk; it contains a profiler; and it provides code coverage functionality for use with PHPUnit.",[18,22,23,24,31],{},"Go to Xdebug page, choose and download Xdebug extension in this ",[25,26,30],"a",{"href":27,"rel":28},"https:\u002F\u002Fxdebug.org\u002Fdownload.php",[29],"nofollow","link",".",[18,33,34,35,39,40,44],{},"Add this code to file ",[36,37,38],"strong",{},"php.ini",".\n",[41,42,43],"code",{},"[XDebug] zend_extension = \"D:\\xampp\\php\\ext\\php_xdebug-2.4.1-5.4-vc9.dll\" xdebug.remote_enable = 1 xdebug.remote_autostart = 1 xdebug.remote_host = localhost","\n[Cation]Fix \"D:\\xampp\\php\\ext\\php_xdebug-2.4.1-5.4-vc9.dll\" by your development environment.",[18,46,47],{},"Restart XAMPP.",[10,49,51],{"id":50},"_2-settingdebuginvscode","2. Setting debug in VScode",[15,53,54],{},[18,55,56,57,62],{},"Find and install ",[25,58,61],{"href":59,"rel":60},"https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=felixfbecker.php-debug",[29],"PHP Debug"," extension.",[64,65],"img",{"className":66,"alt":70,"src":71,"style":72},[67,68,69],"block","mx-auto","mb-4","","https:\u002F\u002Fhomepage-media.s3.ap-southeast-1.amazonaws.com\u002Fwp-content\u002Fuploads\u002F2019\u002F08\u002F05150213\u002Fdebug1.png","width: 50%",[15,74,75],{},[18,76,77],{},"Go to debug bar and choose Add Configuration.",[64,79],{"className":80,"alt":70,"src":81,"style":72},[67,68,69],"https:\u002F\u002Fhomepage-media.s3.ap-southeast-1.amazonaws.com\u002Fwp-content\u002Fuploads\u002F2019\u002F08\u002F05150233\u002Fdebug2.png",[15,83,84],{},[18,85,86],{},"In the popup window, choose PHP.",[64,88],{"className":89,"alt":70,"src":90,"style":91},[67,68,69],"https:\u002F\u002Fhomepage-media.s3.ap-southeast-1.amazonaws.com\u002Fwp-content\u002Fuploads\u002F2019\u002F08\u002F05150248\u002Fdebug3.png","width: 100%",[15,93,94],{},[18,95,96],{},"Now, start debug in VSCode, we can add checkpoint and view variable data.",[64,98],{"className":99,"alt":70,"src":100,"style":91},[67,68,69],"https:\u002F\u002Fhomepage-media.s3.ap-southeast-1.amazonaws.com\u002Fwp-content\u002Fuploads\u002F2019\u002F08\u002F05150309\u002Fcheckpoint.png",{"title":70,"searchDepth":102,"depth":102,"links":103},2,[104,106],{"id":12,"depth":105,"text":13},3,{"id":50,"depth":105,"text":51},"tech talk","Briswell Vietnam Co Ltd","2019-08-16","Xdebug is an extension for PHP to assist with debugging and development. It contains a single step debugger to use with IDEs; it upgrades PHP's var_dump() function; it adds stack traces for Notices, Warnings, Errors and Exceptions","md",{},true,"\u002Fnews\u002Fdebug-cakephp-trong-vscode-voi-xdebug",null,{"title":5,"description":110},"news\u002Fdebug-cakephp-trong-vscode-voi-xdebug","https:\u002F\u002Fhomepage-media.s3.ap-southeast-1.amazonaws.com\u002Fwp-content\u002Fuploads\u002F2019\u002F08\u002F05150150\u002Fvscode_logo.png","s5WW7VvhV8Sm4r0oe9dembq1z3piF1037vXuNSj7Bxg",1785320518194]