# Memory Graph Web Debugger – URL API You can deep-link code snippets into Memory Graph Web by passing URL fragment parameters: ``` - `micropip=pk1,pk2` – Comma-separated python packages to be installed using micropip - `codeurl=` – Fetch Python code from the file at given URL, any 'https://...' URL will work - `code=` – Get Python code directly from the current URL, use 'encodeURIComponent' - `files=` – Multi-file alternative to `code`/`codeurl`/`breakpoints`: open several files at once, each with its own content and breakpoints (see 'Multiple files' below) - `breakpoints=1,5,9` – Line numbers for comma-separated breakpoints, sets breakpoint on lines 1, 5 and 9. Line numbers are 1-based, blank lines count. Only applies to the single file opened via `code`/`codeurl`; ignored when `files` is used - `args=` – Command line arguments passed to the program as `sys.argv`, use 'encodeURIComponent' - `continues=2` – number of continues to perform at page load to control where execution pauses - `timestep=1.0` – seconds to wait between steps in the animation - `play` – if present, auto-start a stepping animation by continuously simulating 'Step Into' button presses - `cycle` – if present, the cycle button is set so the animation starts over at the end of the program - `pytest` – if present, run pytest at start - `pytest_args` – Command line arguments passed to pytest, use 'encodeURIComponent' ``` Use only one of `code`, `codeurl`, or `files`. Use only one of `play` or `pytest`. Arguments: `micropip`, `args`, `continues`, `timestep`, `play`, and `cycle` are independent and can be freely combined with any of the three; `breakpoints` only composes with `code`/`codeurl` (with `files`, breakpoints are given per-file instead, see below). ## Embedding on your own site Besides linking to `https://memory-graph.com/`, you can embed the debugger directly in your own page with an ` ``` - Give the iframe an explicit width/height; the app fills whatever box it's given, it has no size of its own. - Python execution needs `SharedArrayBuffer`, which requires cross-origin isolation. For it to work inside your iframe, your own page must send these response headers: ``` Cross-Origin-Opener-Policy: same-origin Cross-Origin-Embedder-Policy: require-corp ``` and the `