我位于 http 请求之后的断点不起作用,我该如何修复它?
我使用 PhpStorm IDE 并使用 Xdebug。
process_upgrade_membership() 函数显示一个表单以注册到我的网站(当前位于我的本地主机上)。当我在此函数上放置断点时,它就会触发。
付款后,recurring_ payment_confirm()
函数由来自 Stripe 的 http 请求触发 ([200] POST http://localhost/mySite/index.php?option=com_osmembership&任务 = recurring_ payment_confirm& payment_method = os_stripe [evt_1KYoa4HVMmgjDnLE4gsKXE5c]
)。当我在此函数上放置断点时,该断点将被忽略。我还尝试在 recurring_ payment_confirm()
使用的函数中放置断点,但没有成功。我通过使用 dd()
测试该函数来确保该函数已被使用。
这两个函数位于同一个文件中。
你能帮我调试http请求之后的内容吗?
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
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
`
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我成功地使其工作,除了在 php.ini 中添加 xdebug.start_with_request=yes 之外,我还将 xdebug chrome 扩展的授权从“单击时”传递到“在所有站点上”谢谢您的帮助
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