Debugging requests from one host to another |
Site Admin
|
your script on VM1 that sends HTTP requests to VM2 should also send DBGSESSID http GET, POST or COOKIE variable that it got from the IDE. So if you start debugging VM1, you'll transparently switch to debugging script on VM2.
|
||||||||||||
_________________ The PHP IDE team |
|
Shouldn't I also create portforward of the default debugger port (7869) from VM1 to my host PC?
I tested the setup as you suggested - my VM1 script looks for the value
I also changed the dbg.ini value on VM2 to
that fixed the hosts restriction. Currently my case is following - VM1 script starts debugging, gets to the point where it sends HTTP request to VM2 and hangs there. I suspect VM2 looks for the debugger client but can't find it. Or I'm missing something here. Setup: Host PC: Windows x64, Nusphere 17.0 VM1 and VM2 both: Linux 14x64 VM1's PHP: 5.6 VM2's PHP: 5.4 Separately they both work like charm. |
||||||||||||||||||
|
Site Admin
|
What you have may work on local machine, but I can't imagine how debugger on VM1 or VM2 would find the IDE. Do you have sort of filters in HTTP? May be they recognize "@ipaddresshere:porthere" as http username/password and strip them? |
||||||||||||||
_________________ The PHP IDE team |
|
Passing "@ip:port" worked. Thanks! That was my mistake. The thing is most of the time I work normally and just put debugbreaks around the code and press F5 in browser - so DBG session starts when it encounters one. In this case I either have no DBGSESSION or DBGSESSION=-1. I guess in my case debugger simply looked at the client ip address and assumed it by default. I tried to build DBGSESSION manually and didn't included ip address - that was my problem. |
||||||||||||||||
|
Debugging requests from one host to another in CLI mode |
|
Hello,
I have the same problem, but this solution doesn't work for me as I am debugging in CLI (Command Line Interface) mode. How can I send DBGSESSID in CLI mode ? Gingko |
||||||||||||
|
Site Admin
|
PhpED supports remote debugging. Just run Project Settings Wizard, pick settings for your projects and it will run CLI php with debugger in the IDE. Remotely.
If you want to do this manually, there are two FAQ pages explaining options: http://www.nusphere.com/kb/technicalfaq/howto_run_dbg.htm http://www.nusphere.com/kb/technicalfaq/faq_dbg_related.htm |
||||||||||||
_________________ The PHP IDE team |
|
How can I do this (in CLI mode) without getting a message like “New debug session with [any file].php has started. But IDE could not find the project for the web debugging. Breakpoints and other features may fail to work”? Gingko |
||||||||||||||
|
Site Admin
|
You're getting this message because you don't have a project that matches the debug session parameters -- such as path, url, etc. The easiest way to setup such project is to run Project Settings Wizard, like I said before. |
||||||||||||||
_________________ The PHP IDE team |
|
And I have run the Project Settings Wizard, and again, again, again, again, again, and again without any error. But I must admit that this project doesn't match the debug session parameters about URLs. Php CLI scripts do not have URLs. Gingko |
||||||||||||||||
|
Guru master
|
On Windows with IP address xxx.xxx.xxx.xxx have PhpED running with the project open. That PhpED can save directly to the storage area (eg on Linux using Samba) if appropriate.
You can have PhpED breakpoints in the script but they won't activate until after the first DebugBreak. In the PHP CLI script use DebugBreak('1@xxx.xxx.xxx.xxx'); When the script runs (eg on Linux), it will hit the DebugBreak, the PHP debugger will contact the debug listener on the Windows computer and that will then activate PhpED. When you continue running (or single step) the script from PhpED, it will then be able to send the other breakpoints to the PHP debugger. |
||||||||||||
|
Site Admin
|
OMG, PhpED supports remote projects for 10 years now. Why don't you just try that? You don't need any DebugBreak(s), you don't need any Sambas, you don't need any dances with permissions and hardlinks.
Getting it passed without errors is not a goal. The goal is to run it in the project besides your files, then save the results discovered by the IDE in the process. If after that you still get error like "new debug session started and project not found", please post all details here (or upgrade to PRO version and contact support) |
||||||||||||||
_________________ The PHP IDE team |
Debugging requests from one host to another |
|
||
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