Skip to content

[Feature]: Support NODE_OPTIONS when launching Electron app #32394

Open
@nbemh1

Description

@nbemh1

🚀 Feature Request

According to Electron, production applications support overriding two options in NODE_OPTIONS:

  1. --max-http-header-size
  2. --http-parser

This is not supported by Playwright when launching Electron application. I know the feature is experimental, but it is a feature we would greatly appreciate, using environment variable NODE_OPTIONS on process/ sent in via env.

According to the code at https://github.com/microsoft/playwright/blob/main/packages/playwright-core/src/server/electron/electron.ts#L212:

// When debugging Playwright test that runs Electron, NODE_OPTIONS
// will make the debugger attach to Electron's Node. But Playwright
// also needs to attach to drive the automation. Disable external debugging.
delete env.NODE_OPTIONS;

Could you find another way to override attaching debugger to drive the automation?

Example

No response

Motivation

This would align Playwrights API more to Electrons API and give developers the ability to test production applications with NODE_OPTIONS set.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions