'My breakpoints located after an http request does not work, how can I fix it?
I work on the PhpStorm IDE and I use Xdebug.
The process_upgrade_membership() function displays a form to register to my website (currently on my localhost). When I place a breakpoint on this function, it triggers.
The recurring_payment_confirm() function is triggered by an http request from Stripe when a payment has been made ([200] POST http://localhost/mySite/index.php?option=com_osmembership&task=recurring_payment_confirm&payment_method=os_stripe [evt_1KYoa4HVMmgjDnLE4gsKXE5c]). When I place a breakpoint on this function, the breakpoint is ignored. I also tried to put breakpoints in the functions used by recurring_payment_confirm() without success. I made sure that the function is used by testing it with a dd().
These two functions are in the same file.
Can you help me debug what's after the http request?
xdebug_info() :
`Version 3.1.3
Support Xdebug on Patreon, GitHub, or as a business
Enabled Features
(through 'xdebug.mode' setting)
Feature Enabled/Disabled Docs
Development Helpers ✘ disabled 🖹
Coverage ✘ disabled 🖹
GC Stats ✘ disabled 🖹
Profiler ✘ disabled 🖹
Step Debugger ✔ enabled 🖹
Tracing ✘ disabled 🖹
Optional Features
Compressed File Support no
Clock Source GetSystemTimePreciseAsFileTime
Diagnostic Log
No messages
Step Debugging Docs
Debugger Active 🖹
Connected Client localhost:9003
DBGp Settings
Max Children 100
Max Data 1024
Max Depth 1
Show Hidden Properties Yes
Extended Properties Yes
Notifications Yes
Resolved Breakpoints Yes
Breakpoint Details No
PHP
Build Configuration
Version (Run Time) 7.2.3
Version (Compile Time) 7.2.34
Debug Build no
Thread Safety enabled
Settings
Configuration File (php.ini) Path C:\WINDOWS
Loaded Configuration File D:\xampp\php\php.ini
Scan this dir for additional .ini files (none)
Additional .ini files parsed (none)
Directive Local Value Master Value Docs
xdebug.mode debug debug 🖹
xdebug.start_with_request default default 🖹
xdebug.start_upon_error default default 🖹
xdebug.output_dir C:\Windows\Temp C:\Windows\Temp 🖹
xdebug.use_compression 0 0 🖹
xdebug.trigger_value no value no value 🖹
xdebug.file_link_format no value no value 🖹
xdebug.filename_format no value no value 🖹
xdebug.log no value no value 🖹
xdebug.log_level 7 7 🖹
xdebug.var_display_max_children 128 128 🖹
xdebug.var_display_max_data 512 512 🖹
xdebug.var_display_max_depth 3 3 🖹
xdebug.max_nesting_level 256 256 🖹
xdebug.cli_color 0 0 🖹
xdebug.force_display_errors Off Off 🖹
xdebug.force_error_reporting 0 0 🖹
xdebug.halt_level 0 0 🖹
xdebug.max_stack_frames -1 -1 🖹
xdebug.show_error_trace Off Off 🖹
xdebug.show_exception_trace Off Off 🖹
xdebug.show_local_vars Off Off 🖹
xdebug.dump.COOKIE no value no value 🖹
xdebug.dump.ENV no value no value 🖹
xdebug.dump.FILES no value no value 🖹
xdebug.dump.GET no value no value 🖹
xdebug.dump.POST no value no value 🖹
xdebug.dump.REQUEST no value no value 🖹
xdebug.dump.SERVER no value no value 🖹
xdebug.dump.SESSION no value no value 🖹
xdebug.dump_globals On On 🖹
xdebug.dump_once On On 🖹
xdebug.dump_undefined Off Off 🖹
xdebug.profiler_output_name cachegrind.out.%p cachegrind.out.%p 🖹
xdebug.profiler_append Off Off 🖹
xdebug.cloud_id no value no value 🖹
xdebug.client_host localhost localhost 🖹
xdebug.client_port 9003 9003 🖹
xdebug.discover_client_host Off Off 🖹
xdebug.client_discovery_header no value no value 🖹
xdebug.idekey no value no value 🖹
xdebug.connect_timeout_ms 200 200 🖹
xdebug.scream Off Off 🖹
xdebug.gc_stats_output_name gcstats.%p gcstats.%p 🖹
xdebug.trace_output_name trace.%c trace.%c 🖹
xdebug.trace_format 0 0 🖹
xdebug.trace_options 0 0 🖹
xdebug.collect_assignments Off Off 🖹
xdebug.collect_return Off Off 🖹
xdebug.remote_autostart (setting renamed in Xdebug 3) (setting renamed in Xdebug 3) 🖹
xdebug.remote_enable (setting renamed in Xdebug 3) (setting renamed in Xdebug 3) 🖹
xdebug.remote_host (setting renamed in Xdebug 3) (setting renamed in Xdebug 3) 🖹
xdebug.remote_log (setting renamed in Xdebug 3) (setting renamed in Xdebug 3) 🖹
xdebug.remote_port (setting renamed in Xdebug 3) (setting renamed in Xdebug 3) 🖹`
in php.ini [xdebug]: `
[xdebug]
zend_extension = D:\xampp\php\ext\php_xdebug.dll
xdebug.remote_autostart = 1
;xdebug.profiler_append = 0
;xdebug.profiler_enable = 0
;xdebug.profiler_enable_trigger = 0
;xdebug.profiler_output_dir = "D:\xampp\tmp"
xdebug.remote_enable=1
xdebug.mode=debug
xdebug.remote_host=127.0.0.1
xdebug.remote_log="d:\xampp\tmp\xdebug.txt"
xdebug.remote_port="9000"
xdebug.start_with_request=yes
;xdebug.remote_mode=jit
;xdebug.remote_cookie_expire_time = 36000
`
Solution 1:[1]
I success to make it work, I pass the authorization of the xdebug chrome extension from "in case of a click" to "on all sites" in addition to add xdebug.start_with_request=yes in php.ini Thank you for your assistance
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | timothée |
