vscode-php-debug icon indicating copy to clipboard operation
vscode-php-debug copied to clipboard

Debugging stopped working with Php framework Phalcon

Open amsharma9 opened this issue 5 years ago • 0 comments

Hi,

I am on Windows 10 (64 bit) with Wamp server. I am able to debug core php code without any issues but am unable to debug my Phalcon framework code for last one week. It was working fine till one week ago when I was on VSCode 1.36 and XDebug 2.7.x. I debugged a core Php app and then came back to the Phalcon app and it had stopped debugging. I thought some upgrade created an issue even though I had automatic updates off - probably an incorrect conclusion in hindsight. So I decided to upgade VSCode (version details given below in box) to latest. I upgraded the XDebug also to latest version 2.9.6.

Version: 1.46.1 (user setup)
Commit: cd9ea6488829f560dc949a8b2fb789f3cdc05f5d
Date: 2020-06-17T21:13:20.174Z
Electron: 7.3.1
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.16299

I have attached the Adapter log, it might give you some hint. The situation currently is that, it starts debug when I press F5. I then go to my web page and execute the php page. It comes to debugger at first break point but after 5 seconds or so the debugger is kind of disconnected, i.e. debugging is off. Call Stack disappears, the adapter log shows "ECONNRESET". I am able to telnet on port 9000 when debugger is ON. I have tried changing some options but it hasn't helped. E.g. I added below to launch.json:

"stopOnEntry": false

Added below to php.ini

xdebug.remote_handler = "dbgp"

Kindly help.

PHP version: 7.2.14 XDebug version: 2.9.6 Adapter version: 1.13.0

Your launch.json: { "version": "0.2.0", "configurations": [ { "name": "Listen for XDebug", "type": "php", "request": "launch", "log": true, "port": 9000 }, { "name": "Launch currently open script", "type": "php", "request": "launch", "program": "${file}", "cwd": "${fileDirname}", "stopOnEntry": false, "port": 9000 } ] }

XDebug php.ini config: [xdebug] zend_extension="C:/Wamp/bin/php/php7.2.14/zend_ext/php_xdebug-2.9.6-7.2-vc15-x86_64.dll"

xdebug.remote_enable = 1 xdebug.remote_autostart = 1 xdebug.remote_connect_back = 1

xdebug.profiler_enable = Off xdebug.profiler_enable_trigger = Off xdebug.profiler_output_name = cachegrind.out.%t.%p xdebug.profiler_output_dir ="R:/Temp" xdebug.show_local_vars = 1 xdebug.remote_port = 9000 xdebug.remote_log = R:\Temp\xdebug.log xdebug.remote_host = 127.0.0.1 xdebug.remote_handler = "dbgp"

XDebug logfile (from setting xdebug.remote_log in php.ini):

Adapter logfile (from setting "log": true in launch.json): debuglog.txt

Thanks Amal

amsharma9 avatar Jul 10 '20 07:07 amsharma9