setting up debugging... |
Plodding along... |
|
Okay... I've decided to use the SSH method to connect, but running into a snag...
BTW, I'm really motivated to get this working. I don't really need phped... My fingers know vi very well, but I need a debugger. On my very first programming job, back in 1984, I was writing firmware in assembly language. Even back then we had a breakpoint debugger. I'm fed up trying to write php without a decent debugger. So if I can get this to work, I definitely will buy it! Where I'm at: - dbg 2.16.14 is definitely running on the remote webserver. phpinfo() has dbg section that looks good to me. I've followed the SSH instructions and believe it's configured correctly to connect via SSH. [debugger] debugger.enabled=True debugger.profiler_enabled=True debugger.hosts_allow=localhost ; 24.47.21.53 debugger.hosts_deny=ALL debugger.ports=7869, 10000/16 - phped is running on my linux client box (behind a router). I've followed the SSH instructions and believe it is configured correctly to connect via SSH - I opened an ssh connection from my client machine to the server using a line like (actual login changed to protect the innocent.): ssh -R 7869:localhost:7869 user@domain.com This connects fine. However, when I try to run the debugger in phped, I get a pop up window that says "Failed to run debugging session", along with a rather unhelpful tip. This sent me to the trouble shooting section... - running netstat on the server gives: [root@secure root]# netstat -na|grep 7869 tcp 0 0 127.0.0.1:7869 0.0.0.0:* LISTEN which looks okay. - but when I try to connect back to dbglistner, this is what I get: [root@secure root]# telnet localhost 7869 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Connection closed by foreign host. - same thing if I try to connect back through the SSH tunnel connection: bash-2.05$ telnet localhost 7869 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Connection closed by foreign host. So, now I'm stuck. Any ideas, much appreciated. Brgds: John |
||||||||||||
|
Site Admin
|
Instead of Windows version, Linux one has no separated listening daemon and runs listening socket for 10-15 sec after you click Run In Debugger, depending on the timeout. If nothing comes during this timeframe it shows ~ failed to run debugger, timed out.
For troubleshoting, I'd recommend a) check debugger module on the server (just run browser on your linux box and check phpinfo() output). b) project settings should have correct root URL that points to the server. c) check if phped runs browser when you click Run In Debugger and browsing URL is correct and contains DBGSESSID variable. d) I'd recommend you to have 7869 as debugger port (see tools->settings->debugger tab). |
||||||||||||
|
|
Thanks for the reply...
Now I'm not sure how much of the documentation applies to Linux clients. >>>For troubleshoting, I'd recommend a) check debugger module on the server (just run browser on your linux box and check phpinfo() output). Yes, this looks good. I've changed php.ini back to what it was before. It's now: [debugger] debugger.enabled=True debugger.profiler_enabled=True debugger.hosts_allow=localhost 24.47.21.53 debugger.hosts_deny=ALL debugger.ports=7869, 10000/16 b) project settings should have correct root URL that points to the server. The root URL is correct... it is the URL of the test website I'm working on. c) check if phped runs browser when you click Run In Debugger and browsing URL is correct and contains DBGSESSID variable. It connects to the web server and the correct page, but I get the following result: DBG Failed to run DBG session reason: failed to connect to the client address 24.47.21.53:7869 debugger request found in "query_string". Which is why I believe I need to do something with my router to allow this connection to take place. This is what I was trying to avoid by looking at the SSH option, but now I don't know if that will work with a linux client. d) I'd recommend you to have 7869 as debugger port (see tools->settings->debugger tab). At this point, I have both auto select port and autoselect host checked. -- John |
||||||||||||
|
Success, I think... |
|
I added port forwarding for both ports 7869 and 10000 and that seemed to solve my problem.
I still get the pop up window telling me it couldn't start the debug session, but the browser comes up and phped hits a break point. I can step through and when the script completes, the browser seems to actually display the correct info. I'd really like to know how this works... is the server response to the HTTP request delayed until the script completes??? Really interesting. Anyway, I'm going to put this baby through its paces this weekend. -- John |
||||||||||||
|
Site Admin
|
You may want to increase debug startup TIMEOUT. See tools->settings->debugger tab->"Session wait timeout".
|
||||||||||||
|
setting up debugging... |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by