startup: optional -TraceApi / X2W_TRACE_API switch on run.ps1 #2343

Closed
opened 2026-11-25 13:14:10 +00:00 by cursor · 1 comment
cursor commented 2026-11-25 13:14:10 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by cursor on 2026-11-25T13:14:10Z.


Context

Account-picker and other runtime-proxy digs need $env:X2W_TRACE_API='1' in the same PowerShell process before tools/startup/run.ps1. -TraceCalls is a different switch and does not enable method-level x2w-api lines. Contributors keep missing this (see #870 threads and the account-picker Y notes).

Related runtime work: https://github.com/R0Y00/Xbox2Windows/pull/2349. Refs #870.

Done when

  1. run.ps1 accepts a clear opt-in (for example -TraceApi) that sets X2W_TRACE_API=1 in the child environment the same way other flags set env vars today.
  2. docs/startup-runtime.md (or the run.ps1 comment block) states that -TraceCalls ≠ TRACE_API, and that provider … proxied is the decisive signal even when TRACE_API is off.
  3. Existing launches without the new switch keep TRACE_API unset.

Acceptance command

Select-String -Path tools/startup/run.ps1 -Pattern 'TraceApi|X2W_TRACE_API'
python3 -B tests/docs_links_check.py

If you add a tiny pure check that parses run.ps1 for the new parameter and the env assignment, register it in CMake/Python CI like the other script checks.

Negative control

Invoking run.ps1 without the new switch must not set X2W_TRACE_API. Do not change FakeUser / proxy behavior.

Out of scope

Fixing the account-picker Y stall itself. Title-neutral; no game files.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6605309650 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2351). Originally posted by [cursor](https://github.com/apps/cursor) on 2026-11-25T13:14:10Z. --- ## Context Account-picker and other runtime-proxy digs need `$env:X2W_TRACE_API='1'` in the same PowerShell process before `tools/startup/run.ps1`. `-TraceCalls` is a different switch and does **not** enable method-level `x2w-api` lines. Contributors keep missing this (see #870 threads and the account-picker Y notes). Related runtime work: https://github.com/R0Y00/Xbox2Windows/pull/2349. Refs #870. ## Done when 1. `run.ps1` accepts a clear opt-in (for example `-TraceApi`) that sets `X2W_TRACE_API=1` in the child environment the same way other flags set env vars today. 2. `docs/startup-runtime.md` (or the run.ps1 comment block) states that `-TraceCalls` ≠ TRACE_API, and that `provider … proxied` is the decisive signal even when TRACE_API is off. 3. Existing launches without the new switch keep TRACE_API unset. ## Acceptance command ```powershell Select-String -Path tools/startup/run.ps1 -Pattern 'TraceApi|X2W_TRACE_API' python3 -B tests/docs_links_check.py ``` If you add a tiny pure check that parses `run.ps1` for the new parameter and the env assignment, register it in CMake/Python CI like the other script checks. ## Negative control Invoking `run.ps1` **without** the new switch must not set `X2W_TRACE_API`. Do not change FakeUser / proxy behavior. ## Out of scope Fixing the account-picker Y stall itself. Title-neutral; no game files.
RavenCurseBurg commented 2026-11-25 14:05:08 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T13:17:25Z.


I'll take the launcher switch and its contributor documentation. I'll exercise opt-in, default and inherited-environment behavior with a source-built child process so the check can run without a title.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7163562904 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2351#issuecomment-7163562904). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T13:17:25Z. --- I'll take the launcher switch and its contributor documentation. I'll exercise opt-in, default and inherited-environment behavior with a source-built child process so the check can run without a title.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows#2343
No description provided.