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

Closed
opened 2026-11-27 00:18:08 +00:00 by github-bot · 1 comment
Owner

@⁠cursor[bot] on GitHub · 2026-11-25 13:14 UTC · original

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: #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.

**@⁠cursor[bot]** on GitHub · 2026-11-25 13:14 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/2351) ## 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://git.gtahub.st/github/R0Y00--Xbox2Windows/pulls/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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 00:18:08 +00:00
Author
Owner

@⁠RavenCurseBurg on GitHub · 2026-11-25 13:17 UTC · original

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.

**@⁠RavenCurseBurg** on GitHub · 2026-11-25 13:17 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/2351#issuecomment-7163562904) 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.
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/R0Y00--Xbox2Windows#2351
No description provided.