Debug agent uses 127.0.0.1 instead of 10.0.2.2 in Android emulator instrumentation

Where does the bug appear (feature/product)?

Somewhere else…

Describe the Bug

The Debug agent added instrumentation code that tried to use 127.0.0.1 inside the emulator instead of 10.0.2.2, causing connectivity failures when attempting to reach the host machine.
Steps to Reproduce:

Instrumentation uses 127.0.0.1, which points to the emulator itself, resulting in failed connectivity.

Impact:
Debugging and runtime evidence collection fail in emulator environments, causing the Debugging Agent to fail.

Workaround
Ask the agent to write the instrumentation code using the proper 10.0.2.2 IP

Environment:

Android Emulator
Debug agent mode being used

Steps to Reproduce

  1. Run the application in an Android emulator with Debug agent instrumentation code added.
  2. Trigger instrumentation that sends data to the host machine.
  3. Observe the endpoint being used (127.0.0.1 instead of 10.0.2.2).

Expected Behavior

Instrumentation should use 10.0.2.2 as the endpoint to correctly map to the host machine’s localhost.

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.2.14 (user setup)
VSCode Version: 1.105.1
Commit: 1685afce45886aa5579025ac7e077fc3d4369c50
Date: 2025-12-11T01:12:35.790Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26200

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report.

This is a bug in the new Debug Mode - the agent should automatically detect the Android emulator and use the correct IP 10.0.2.2 to communicate with the host machine.

I’ll pass this to the dev team for a fix. In the meantime, your workaround (explicitly telling the agent to use 10.0.2.2) is the right approach.

It would be helpful if you could share the Request ID from the chat where this happened (chat menu top-right > Copy Request ID). That will help engineers investigate faster.