chrome-devtools-mcp icon indicating copy to clipboard operation
chrome-devtools-mcp copied to clipboard

Cannot Disable CPU Emulation in `emulate_cpu` Tool

Open mithun50 opened this issue 1 year ago • 2 comments

Description:
The emulate_cpu tool located in src/tools/emulation.ts does not currently support disabling CPU emulation once it has been enabled. The throttlingRate parameter enforces a minimum value of 1, which applies the lowest level of throttling but does not fully disable the emulation. This behavior is inconsistent with the emulate_network tool, which allows network emulation to be completely turned off.

The underlying Puppeteer API (page.emulateCPUThrottling) expects a value of null or 0 to disable CPU throttling, which is not supported by the current implementation.


To Reproduce:

  1. Enable CPU emulation using the emulate_cpu tool.
  2. Try setting throttlingRate = 0 or attempt to disable the feature.
  3. Observe that throttling remains active at the minimum level instead of turning off.
  4. Compare this behavior with emulate_network, which allows disabling.

Expected Behavior:
Setting throttlingRate to 0 or null should fully disable CPU emulation, in line with how emulate_network behaves. The tool should allow disabling the feature entirely without requiring a full reload.


mithun50 avatar Oct 01 '25 15:10 mithun50

If you guys assign this issue to me I can work on fixing this issue

mithun50 avatar Oct 01 '25 15:10 mithun50

Hello,

The current underlying implementation is working as expected and 1 is also a correct value for resetting the CPU emulation. Given that I will mark this issue as close, but feel free to leave more comments here and I will follow up. Was there an issue with using that tool that you observed?

Lightning00Blade avatar Oct 01 '25 16:10 Lightning00Blade