Skip to content

XDEGUG intercepting requests from any and all IP's, local or remote #1005

Closed
@OPSCarlos

Description

@OPSCarlos

XDEGUG intercepting requests from any and all IP's, local or remote, when debugging with VSCODE through Remote-SSH.

It does not matter how I configure php.ini in the server or Xdebug launch.json on my local machine, if I listen for Xdebug in VSCODE and then launch a web browser pointed to my site, XDebug will intercept and pause no matter which IP address I am launching the website from. It can be from a machine in my local network where my VSCODE machine sits or a machine anywhere outside my local network (remote location).

My expectation, based on the configuration, is that only web requests launched from my local network would be intercepted; even only web requests from my VSCODE machine!

Software Versions:

Distributor ID: Ubuntu
Description: Ubuntu 22.04.5 LTS
Release: 22.04
Codename: jammy

XDebug Version: 3.4.2

Server php.ini Configuration:

`
zend_extension=xdebug.so

xdebug.mode = debug

xdebug.discover_client_host = 1

xdebug.log = "/var/log/xdebug.log"

xdebug.log_level=1

xdebug.start_with_request = yes
`

Local Workstation Software:

Edition: Windows 11 Home
Version: 24H2
OS build:26100.3624

VSCODE Related Software:

VSCODE Version 1.99.1
Remote - SSH Version 0.119.0
PHP Debug (XDebug) version 1.35.0

VSCODE XDebug JSON Configuration:

`
"version": "0.2.0",
"configurations": [

    {
        "name": "Listen for Xdebug",
        "type": "php",
        "request": "launch",
        "port": 9003
    }

`
I have tried changing the server php.ini configuration with one of the following instead of xdebug.discover_client_host = 1:

  • xdebug.client_host = 127.0.0.1
  • xdebug.client_host = localhost
  • xdebug.client_host=1

I am not an expert by any means so any guidance to properly configure would be greatly appretiated. Thanks in advance
Carlos

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions