{"id":117,"date":"2024-12-27T19:21:48","date_gmt":"2024-12-27T22:21:48","guid":{"rendered":"https:\/\/recover.rdconsolo.com.br\/?p=117"},"modified":"2024-12-27T19:37:24","modified_gmt":"2024-12-27T22:37:24","slug":"xdebug-no-vscode-para-codeigniter-4","status":"publish","type":"post","link":"https:\/\/rdconsolo.com.br\/?p=117","title":{"rendered":"XDebug no VSCode para CodeIgniter 4"},"content":{"rendered":"\n<p>A jun\u00e7\u00e3o do PHP com o XDebug permite a depura\u00e7\u00e3o do c\u00f3digo em passos com a visualiza\u00e7\u00e3o dos valores das vari\u00e1veis em tempo real.<\/p>\n\n\n\n<p>Para quem tem projetos CI4, a configura\u00e7\u00e3o abaixo deve ser inserida no arquivo launch.json do VSCode.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"json\" class=\"language-json line-numbers\">{\n    \"name\": \"CI4 Spark XDebug\",\n    \"type\": \"php\",\n    \"request\": \"launch\",\n    \"runtimeArgs\": [\n        \"spark\",\n        \"serve\",\n        \"-dxdebug.mode=debug\",\n        \"-dxdebug.start_with_request=yes\",\n        \"-S\",\n        \"localhost:8080\",\n    ],\n    \"env\": {\n        \"XDEBUG_MODE\": \"debug\",\n        \"XDEBUG_SESSION\": \"factor\",\n    },\n    \"externalConsole\": false,\n    \"program\": \"\",\n    \"cwd\": \"${workspaceRoot}\",\n    \"port\": 9003,\n    \"serverReadyAction\": {\n        \"action\": \"openExternally\",\n        \"killOnServerStop\": false\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>A jun\u00e7\u00e3o do PHP com o XDebug permite a depura\u00e7\u00e3o do c\u00f3digo em passos com a visualiza\u00e7\u00e3o dos valores das vari\u00e1veis em tempo real. Para quem tem projetos CI4, a configura\u00e7\u00e3o abaixo deve ser inserida no arquivo launch.json do VSCode.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[23,33,22,32],"class_list":["post-117","post","type-post","status-publish","format-standard","hentry","category-developer","tag-codeigniter","tag-debug","tag-php","tag-vscode"],"_links":{"self":[{"href":"https:\/\/rdconsolo.com.br\/index.php?rest_route=\/wp\/v2\/posts\/117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rdconsolo.com.br\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rdconsolo.com.br\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rdconsolo.com.br\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rdconsolo.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=117"}],"version-history":[{"count":2,"href":"https:\/\/rdconsolo.com.br\/index.php?rest_route=\/wp\/v2\/posts\/117\/revisions"}],"predecessor-version":[{"id":138,"href":"https:\/\/rdconsolo.com.br\/index.php?rest_route=\/wp\/v2\/posts\/117\/revisions\/138"}],"wp:attachment":[{"href":"https:\/\/rdconsolo.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rdconsolo.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rdconsolo.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}