Page MenuHomePhabricator

Facilitate Codex debugging from MW instances
Open, Needs TriagePublic

Description

Background

At the moment it is hard to debug Codex issues directly from a MediaWiki instance because the included file in resources/lib/codex is a compiled umd module.

Goal

We should facilitate to directly debug Codex issues from MW instances with the regular mechanism ?debug=1 & ?debug=2 (original task: T85805)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I'm not sure how easy or high-priority this task will be, so I'd like to propose some work-arounds.

  1. It's currently possible to use the Vue devtools browser extension with Codex inside of MW by running in Debug Mode (append &debug=true, or 1/2 to your URL). I personally find this to be extremely helpful and makes classical debugging unnecessary for most situations; you can see live component data, events and payloads, etc.
  2. For deeper debugging of Codex itself, I'd recommend just pulling down the upstream repo and running Vite in development mode. There is a sandbox page at index.html that you can use to play around with the various components – just run npm run dev to see it; you'll get hot-module reloading so that you can see tweaks as soon as you make them. You also get each component delivered as a separate module in this case based on how Vite's dev mode functions.