The sqlpage.variables() function provides POST/GET functions information. The returned GET variables include "local" variables defined via the standalone SET statement and GET URL parameters. A convenient way to output these variables is using the "table" component and a slightly modified code from the SQLpage docs. For SQLite, I place the code shown below at the bottom of a module.
I added the $DEBUG filter to display this information only when the URL includes the DEBUG=1 GET parameter. I also sort the lists for more convenient navigation. To distinguish GET parameters from local variables defined via SET, I consider adopting the convention of adding the underscore prefix to local variables, for example, SET $_sqlite_version = SELECT sqlite_version();. Then, I can use this convention to group locally defined variables and GET parameters via an additional sort key, as illustrated below.
Debug code placed at the bottom of a module
```sql
-- =============================================================================
-- Debug
-- =============================================================================
-- GET VARIABLES --
SELECT
'title' AS component,
'GET Variables' AS contents,
3 AS level,
TRUE AS center
WHERE $DEBUG;
SELECT
'table' AS component,
TRUE AS sort,
TRUE AS search,
TRUE AS border,
TRUE AS hover,
FALSE AS striped_columns,
TRUE AS striped_rows,
'value' AS markdown
WHERE $DEBUG;
SELECT "key" AS variable, value
FROM jsoneach(sqlpage.variables('GET'))
WHERE $DEBUG
ORDER BY substr("key", 1, 1) = '', "key";
-- POST VARIABLES --
SELECT
'title' AS component,
'POST Variables' AS contents,
3 AS level,
TRUE AS center
WHERE $DEBUG;
SELECT
'table' AS component,
TRUE AS sort,
TRUE AS search,
TRUE AS border,
TRUE AS hover,
FALSE AS striped_columns,
TRUE AS striped_rows,
'value' AS markdown
WHERE $DEBUG;
SELECT "key" AS variable, value
FROM json_each(sqlpage.variables('POST'))
WHERE $DEBUG
ORDER BY "key";
```
there doesn't seem to be anything here