I have an issue with Laragon PHP and Xdebug.
PHP = 8.1.9, Xdebug = 3.1.5
The server was working fine after setting up Xdebug and trying to listen for Xdebug, but when I'm not debugging the server won't start and keeps loading (PHP apps and scripts not working).
php.ini :
[xdebug]
zend_extension=php_xdebug.dll
xdebug.mode=debug
xdebug.start_with_request=yes
launch.json :
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9003
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 0,
"runtimeArgs": [
"-dxdebug.start_with_request=yes"
],
"env": {
"XDEBUG_MODE": "debug,develop",
"XDEBUG_CONFIG": "client_port=${port}"
}
},
{
"name": "Launch Built-in web server",
"type": "php",
"request": "launch",
"runtimeArgs": [
"-dxdebug.mode=debug",
"-dxdebug.start_with_request=yes",
"-S",
"localhost:0"
],
"program": "",
"cwd": "${workspaceRoot}",
"port": 9003,
"serverReadyAction": {
"pattern": "Development Server \\(http://localhost:([0-9]+)\\) started",
"uriFormat": "http://localhost:%s",
"action": "openExternally"
}
}
]
}
Related
I am trying configure Xdebug in VS Code to debug Magento 2. But when I tried to run "Listen for Xdebug" its not stopping at the breakpoints.
My lunch.json file:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"name": "Launch Extension",
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "npm",
"request": "launch",
"type": "pwa-extensionHost"
},
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9003,
"stopOnEntry": true,
"log": true,
"pathMappings": {"/var/wwww/html":"${workspaceRoot}"}
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 0,
"log": true,
"runtimeArgs": [
"-dxdebug.start_with_request=yes"
],
"env": {
"XDEBUG_MODE": "debug,develop",
"XDEBUG_CONFIG": "client_port=${port}"
}
},
{
"name": "Launch Built-in web server",
"type": "php",
"request": "launch",
"log": true,
"runtimeArgs": [
"-dxdebug.mode=debug",
"-dxdebug.start_with_request=yes",
"-S",
"localhost:8000"
],
"program": "",
"cwd": "${workspaceRoot}",
"port": 9003,
"serverReadyAction": {
"pattern": "Development Server \\(http://localhost:([0-9]+)\\) started",
"uriFormat": "http://localhost:%s",
"action": "openExternally"
}
}
]
}
/etc/php/7.4/mods-available/xdebug.ini file:
zend_extension=/usr/lib/php/20190902/xdebug.so
xdebug.remote_autostart = 1
xdebug.remote_enable = 1
xdebug.remote_handler = dbgp
xdebug.remote_host = 127.0.0.1
xdebug.remote_log = /tmp/xdebug_remote.log
xdebug.remote_mode = req
xdebug.remote_port = 9003 #if you want to change the port you can change
xdebug.max_nesting_level = 500
xdebug.mode=debug
Can anyone help me to understand what I am missing?
I'm trying to set up Xdebug on a docker container running on Ubuntu 22.04 host. It is not stopping on breakpoints.
Xdebug is correctly installed because in PhpStorm breakpoints are working but not in VS Code
{
// Use IntelliSense para saber los atributos posibles.
// Mantenga el puntero para ver las descripciones de los existentes atributos.
// Para más información, visite: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9003,
"pathMappings": {
"/home/myuser/projects/myproject": "/application"
}
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 0,
"runtimeArgs": [
"-dxdebug.start_with_request=yes"
],
"env": {
"XDEBUG_MODE": "debug,develop",
"XDEBUG_CONFIG": "client_port=${port}"
}
},
{
"name": "Launch Built-in web server",
"type": "php",
"request": "launch",
"runtimeArgs": [
"-dxdebug.mode=debug",
"-dxdebug.start_with_request=yes",
"-S",
"localhost:0"
],
"program": "",
"cwd": "${workspaceRoot}",
"port": 9003,
"serverReadyAction": {
"pattern": "Development Server \\(http://localhost:([0-9]+)\\) started",
"uriFormat": "http://localhost:%s",
"action": "openExternally"
}
}
]
}
I've added pathMappings options in launch.json file but it is still not working. Did I missed something?
I really need your help...
I've been trying to do Xdebug on my VSC for 2 days.
I have reinstalled the wamp 20 times and nothing.
I have changed the php.ini 100 times and nothing.
Nothing in the xdebug.log
Use the xdebugger wizard
It shows up fine in the phpinfo
I need your help!!!!!!!!!!!
; XDEBUG Extension
[xdebug]
;xdebug.mode allowed are : off develop coverage debug gcstats profile trace
zend_extension=xdebug
xdebug.remote_enable = 1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9003
xdebug.remote_handler=dbgp
xdebug.remote_autostart = 1
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir ="C:/wamp64/tmp"
xdebug.show_local_vars=0
xdebug.log=C:/wamp64/tmp/xdebug.log
settings.jaison
{
"php.validate.enable": true,
"php.validate.executablePath": "C:/wamp64/bin/php/php7.4.26/php.exe",
"php.validate.run": "onSave",
"files.autoSave": "onFocusChange",
"window.zoomLevel": 1,
}
"version": "0.2.0",
"configurations": [
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 0,
"runtimeArgs": [
"-dxdebug.start_with_request=yes"
],
"env": {
"XDEBUG_MODE": "debug,develop",
"XDEBUG_CONFIG": "client_port=${port}"
}
},
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9003,
},
{
"name": "Launch Built-in web server",
"type": "php",
"request": "launch",
"runtimeArgs": [
"-dxdebug.mode=debug",
"-dxdebug.start_with_request=yes",
"-S",
"localhost:0"
],
"program": "",
"cwd": "${workspaceRoot}",
"port": 9003,
"serverReadyAction": {
"pattern": "Development Server \\(http://localhost:([0-9]+)\\) started",
"uriFormat": "http://localhost:%s",
"action": "openExternally"
}
}
]
}
The setting names and values in Xdebug 3 have changed, please read the Upgrade Guide and go through your current settings one by one.
I'm using Amazon S3 to version some of my premium WordPress plugins.
I require them using Composer, but I'm getting a warning Key type is a duplicate in ./composer.json at line XX.
This is the repository part of my composer.json. I've tried a few different versions already but I'm not sure what to replace packages with instead. The dependencies are downloading fine, but I like to get rid of this error as the deployment pipeline is suffering when it's checking for issues.
"repositories": [{
"type": "composer",
"url": "https://wpackagist.org"
},
{
"type": "composer",
"url": "https://composer.deliciousbrains.com/xxx"
},
{
"type": "package",
"package": {
"name": "xxx",
"version": "2.6.1",
"type": "wordpress-plugin",
"dist": {
"type": "zip",
"url": "https://xxx.s3.amazonaws.com/xxx/xxx_2.6.1.zip"
}
},
"type": "package",
"package": {
"name": "xxx",
"version": "2.0.1",
"type": "wordpress-theme",
"dist": {
"type": "zip",
"url": "https://xxx.s3.amazonaws.com/xxx/xxx.zip"
}
}
}
]
"repositories": [{
"type": "composer",
"url": "https://wpackagist.org"
}, {
"type": "composer",
"url": "https://composer.deliciousbrains.com/xxx"
}, {
"type": "package",
"package": {
"name": "xxx",
"version": "2.6.1",
"type": "wordpress-plugin",
"dist": {
"type": "zip",
"url": "https://xxx.s3.amazonaws.com/xxx/xxx_2.6.1.zip"
}
}
}, {
"type": "package",
"package": {
"name": "xxx",
"version": "2.0.1",
"type": "wordpress-theme",
"dist": {
"type": "zip",
"url": "https://xxx.s3.amazonaws.com/xxx/xxx.zip"
}
}
}]
2 braces were skipped so sibling objects became merged into one
I need to work on a site made with symfony, I downloaded directories, and files from live (working) site on my local environment, and when trying to access the site it gives me:
The json file 'path-to/htdocs/config/maps.json' is missing
I undesrtand I should change that somewhere as it should be;
/htdocs/SITE_NAME/config/maps.json
but where do I change that?
If you think there are some other path changes to be made, please suggest them.
Thank you
EDIT to add sample of map.json
{
"routes": [
{
"request": "admin\/home",
"controller": "Admin\/Index",
"title": "Administration Panel",
"injections": [],
"tpl": "index.html.twig",
"dependancies": [
"Admin\/AdminLogin"
],
"css": [
"http:\/\/fonts.googleapis.com\/css?family=Molle:400italic",
"http:\/\/fonts.googleapis.com\/css?family=Monda:700",
"\/deployment\/css\/mods\/admin_mod\/admin.css",
"\/deployment\/css\/mods\/admin_mod\/interface.css",
"\/deployment\/css\/mods\/admin_mod\/admin-custom.css"
],
"js": [
"\/js\/Vendors\/jquery-2.1.1.min.js",
"\/js\/Vendors\/angular.min.js",
"\/js\/modules\/ngUtils.js",
"\/js\/Vendors\/ckeditor\/ckeditor.js",
"\/js\/Vendors\/ngDialog.js",
"\/js\/Mods\/Admin_mod\/definitions.js"
],
"keywords": [
"administration panel",
"admin panel"
],
"description": "Web site administration panel"
},
{
"request": "admin\/logout",
"controller": "Admin\/AdminLogin:logout",
"injections": [
"entityManager"
],
"params": [],
"dependancies": [],
"css": [],
"js": []
},
{
"request": "",
"controller": "",
"injections": [],
"dependancies": [],
"params": [],
"tpl": "",
"css": [],
"js": [],
"title": "",
"keywords": [],
"description": []
},