Phpstorm Intranet Remote Debug

Source: Internet
Author: User

Home use is radio and television network, connected without line, in 192.168.1.1 is configured port forwarding, 9001 forwarding to 192.168.1.101, and then the corresponding configuration in the php.ini xdebug, phpstorm boot monitoring, the result was disappointed, I set the breakpoint does not have any reaction, did not get the slightest debug information, in the look at the network link, Phpstorm really is in 9001 listening, came to the server Tail-f/root/xdebug.log received from the local request, but the returned information can not be reached, Then decided that my network address has a problem, call the radio and television customer service, sure enough, our dial-up is indeed assigned a separate IP but, this IP is in a local area network, because radio and television is leased the line of telecommunications, how to do? Write your own forwarding, I heard that Nodejs do these work is very silly, do not bother to win socket or Linux socket, of course, the premise is all installed Nodejs

Linux:

varNET = require (' net ');varUtil=require (' Util ');varSock1;varSock2;varServer = Net.createserver (function(c) {//' Connection ' listenersock1=C; Console.log (' Client Connected '); Console.log (' Remoteaddr= ' +c.remoteaddress); Console.log (' remoteport= ' +c.remoteport); Console.log (‘------------------------------‘); C.on (' End ',function() {Console.log (' Client Disconnected ');  }); C.on (' Data ',function(data) {Console.log (' Data received ');    Console.log (data); Console.log (‘------------------------‘);  Sock2.write (data); });}); Server.listen (8124,function() {//' listening ' listenerConsole.log (' Server start ');});varserver9001 = Net.createserver (function(c) {Sock2=C; C.on (' Data ',function(data) {Console.log (' Data from ' +c.remoteaddress+ ': ' +c.remoteport);    Console.log (data); Console.log ("--------------------------------");  Sock1.write (data); });}); Server9001.listen (9001,function() {Console.log (' server9001 start ');});

Win7

varNET = require (' net ');varHOST = ' 115.28.200.122 ';varPORT = 8124;varPhpstorm =NewNet. Socket ();varProxyclient =NewNet. Socket ();p Hpstorm.connect (9001, ' localhost ',function() {Console.log ("Phpstorm Connected"); Console.log (‘--------------------------‘);}); Proxyclient.connect (PORT, HOST,function() {Console.log (' Proxyclient CONNECTED to: ' + HOST + ': ' +PORT); Console.log (‘--------------------------‘);}); Proxyclient.on (' Data ',function(data) {Console.log ("Proxyclient Data Received");    Console.log (data); Console.log ("----------------------------------"); Phpstorm.write (data);}); Proxyclient.on (' Close ',function() {Console.log (' Connection closed ');}); Phpstorm.on (' Data ',function(data) {Console.log (' Phpstorm data received ');    Console.log (data); Console.log ("------------------------------"); Proxyclient.write (data);});

Phpstorm Intranet Remote Debug

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.