Skip to content

[wrangler] Add support for customising inspector IP address#12008

Merged
penalosa merged 1 commit intomainfrom
penalosa/custom-inspector-ip
Jan 22, 2026
Merged

[wrangler] Add support for customising inspector IP address#12008
penalosa merged 1 commit intomainfrom
penalosa/custom-inspector-ip

Conversation

@penalosa
Copy link
Copy Markdown
Contributor

Fixes #5603

This PR adds support for customising the IP address that the inspector server listens on via a new --inspector-ip CLI flag and dev.inspector_ip configuration option.

Problem

Previously, the inspector was hardcoded to listen only on 127.0.0.1, which prevented debugging in Docker containers and other environments where external access is needed.

Solution

  • Added --inspector-ip CLI flag to wrangler dev
  • Added dev.inspector_ip configuration option in wrangler.json/wrangler.toml
  • Updated the inspector proxy controller to accept and use a custom hostname
  • Added comprehensive tests for the new functionality
  • Default remains 127.0.0.1 for security

Example Usage

# CLI flag
wrangler dev --inspector-ip 0.0.0.0
// wrangler.json
{
  "dev": {
    "inspector_ip": "0.0.0.0"
  }
}

  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: CLI flag and config option are self-documenting, and the changeset includes usage examples

Adds a new `--inspector-ip` CLI flag and `dev.inspector_ip` configuration
option to allow customising the IP address that the inspector server listens
on. This enables debugging in Docker containers and other environments where
binding to 127.0.0.1 is not sufficient.

Previously, the inspector was hardcoded to listen only on 127.0.0.1, which
prevented debugging in containerized environments where external access is
needed.

Fixes #5603

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@penalosa penalosa requested review from a team as code owners January 20, 2026 18:34
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jan 20, 2026

🦋 Changeset detected

Latest commit: ca5e9e4

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Jan 20, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@12008

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@12008

miniflare

npm i https://pkg.pr.new/miniflare@12008

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@12008

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@12008

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@12008

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@12008

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@12008

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@12008

wrangler

npm i https://pkg.pr.new/wrangler@12008

commit: ca5e9e4

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Jan 22, 2026
@penalosa penalosa merged commit e414f05 into main Jan 22, 2026
51 of 54 checks passed
@penalosa penalosa deleted the penalosa/custom-inspector-ip branch January 22, 2026 15:00
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Support customising the inspector IP

3 participants