Instead of redirecting the outgoing web traffic (443 since my site is using SSL) from Windows through WSL, then redirect from WSL to Server X. My initial idea of using port forwarding was correct, but not in the direction I thought. ![]() As such, populating xdebug.client_host with this IP, will not work. 0.0/12 private address range and is not directly accessible by anything external to the host Windows machine. Has anyone run into this issue and have any idea how to get around it? Or is what I'm trying to do unsupported/discouraged? I've been trying to play around with using SSH tunnels to re-route my port 443 traffic from Windows through WSL, but have been unsuccessful so far. ![]() I've confirmed if I instead run VSC as a Windows application (IE: not using Remote - WSL extension on WSL2 instance) everything works fine after adjusting some setting paths to point to Windows PHP rather than WSL2 PHP. 3:9003 while it's running as a WSL2 application. 2:9003, but doesn't find one because my VSC is listening on 192.168.1. So in short, I'm initiating a browser session outside of WSL (IP: 192.168.1.2), the remote server attempts to connect to a debugger at 192.168.1. I've determined the reason is because while running as a WSL2 application, my IP is different than when I'm outside WSL (which is where I'm refreshing the browser). What's happening is when I turn on "Listen for Remote Connection" in VSC when running as a WSL2 application, it doesn't detect the browser when I refresh it. The intent is to listen for a browser request to initiate the debug session. I'm trying to configure remote debugging of the code on Server X from within VSC running as a WSL2 application (IE: using the "Remote - WSL" extension). ![]() And I cannot run the code locally (in either Windows or WSL2) due to the database connection being unsupported. ![]() This remote server does not support the use of the "Remote - WSL" extension, so I use an "SFTP" extension to push my changes to this server. I have an additional remote server (I'll refer to this as "Server X" which actually hosts/runs the PHP code. So my VSC is running as a WSL2 application, not as a Windows application. I do my development within the WSL2 instance with the "Remote - WSL" extension of Visual Studio Code. I'm running Windows 10, with a WSL2 Ubuntu instance.
0 Comments
Leave a Reply. |