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?
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 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"
}
}
]
}
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 trying to insert data into BigQuery table with partitioning.
And I always get error:
"errors": [
{
"domain": "global",
"reason": "internalError",
"message": "An internal error occurred and the request could not be completed."
}
When I create this table withour partitioning - everything works fine.
When I create smaller table with 27 column - everything works fine.
But when I try to insert more columns - I get this error.
Here is my schema and my code:
[
{"name":"timestamp", "type": "timestamp", "mode": "required"},
{"name":"feid", "type": "string", "mode": "required"},
{"name":"sid", "type": "string", "mode": "required"},
{"name":"remote_addr", "type": "string", "mode": "nullable"},
{"name":"url", "type": "string", "mode": "required"},
{"name":"url_hostname", "type": "string", "mode": "required"},
{"name":"url_uri", "type": "string", "mode": "nullable"},
{"name":"referrer", "type": "string", "mode": "nullable"},
{"name":"referrer_hostname", "type": "string", "mode": "nullable"},
{"name":"device_ratio", "type": "string", "mode": "nullable"},
{"name":"device_screen_size", "type": "string", "mode": "nullable"},
{"name":"device_window_size", "type": "string", "mode": "nullable"},
{"name":"timer_start", "type": "integer", "mode": "required"},
{"name":"timer_init", "type": "integer", "mode": "required"},
{"name":"user_timezone", "type": "string", "mode": "nullable"},
{"name":"user_lang", "type": "string", "mode": "nullable"},
{"name":"nats_code_id", "type": "integer", "mode": "nullable"},
{"name":"nats_sess", "type": "string", "mode": "nullable"},
{"name":"ua_os", "type": "string", "mode": "nullable"},
{"name":"ua_os_version", "type": "string", "mode": "nullable"},
{"name":"ua_browser", "type": "string", "mode": "nullable"},
{"name":"ua_browser_version", "type": "string", "mode": "nullable"},
{"name":"ua_device", "type": "string", "mode": "nullable"},
{"name":"ua_device_type", "type": "string", "mode": "nullable"},
{"name":"date_day", "type": "integer", "mode": "nullable"},
{"name":"date_week", "type": "integer", "mode": "nullable"},
{"name":"date_month", "type": "integer", "mode": "nullable"},
{"name":"date_year", "type": "integer", "mode": "nullable"},
{"name":"geoip_continent", "type": "string", "mode": "nullable"},
{"name":"geoip_country", "type": "string", "mode": "nullable"},
{"name":"geoip_region", "type": "string", "mode": "nullable"},
{"name":"geoip_city", "type": "string", "mode": "nullable"},
{"name":"geoip_latitude", "type": "string", "mode": "nullable"},
{"name":"geoip_longitude", "type": "string", "mode": "nullable"},
{"name":"networkname", "type": "string", "mode": "nullable"},
{"name":"pagetype", "type": "string", "mode": "nullable"},
{"name":"pageid", "type": "string", "mode": "nullable"},
{"name":"templatetype", "type": "string", "mode": "nullable"},
{"name":"locale", "type": "string", "mode": "nullable"},
{"name":"zone", "type": "string", "mode": "nullable"}
]
bq mk --schema=pageviews_v3.json --time_partitioning_type=DAY test.pv3
$rows = [];
$data = [
[
[
"timestamp" => "2016-09-21 19:57:56",
"feid" => "safdhiasgih4",
"sid" => "heghu549023",
...
"zone" => "NONAUTHORIZED",
],
[
"timestamp" => "2016-09-21 19:44:17",
"feid" => "agihgu43q92",
"sid" => "sadfnogsiuphi243",
...
"zone" => "NONAUTHORIZED",
]
]
];
foreach ($data as $item) {
$row = new \Google_Service_Bigquery_TableDataInsertAllRequestRows;
$row->setJson($item);
$row->setInsertId(uniqid());
$rows[] = $row;
}
$service = new \Google_Service_Bigquery($this->client);
$request = new \Google_Service_Bigquery_TableDataInsertAllRequest;
$request->setKind('bigquery#tableDataInsertAllRequest');
$request->setRows($rows);
What can couse this error ? How can I get more detail about this error ?
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": []
},