Phase 5 sub-commit 3: hot-reload docs + .vscode/.idea editor configs

Skeleton README documents the hot-reload story end-to-end:
- PHP-side: frankenphp run --watch (already what `make dev` uses).
- QML-side: Qt Creator Reload, qmlls live preview, run-from-source.
- Dev console: Ctrl+` toggle from sub-commit 1.

Both skeleton and todo example ship .vscode/ (launch.json with Xdebug
attach + Qt-host gdb launch + a compound config, tasks.json for the
make targets, settings.json) and .idea/runConfigurations/ shell run
configs for `make dev`, `make doctor`, `make quality` (and `make
appimage` in the todo example). PhpStorm's Xdebug listener is global
so we don't ship a project-level run config for it; the README
points users at the toolbar toggle.

php-qml-init also rewrites .vscode/launch.json's binary path and
config label so a fresh scaffold's debugger configs point at the
new project's binary.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-02 21:28:02 +02:00
parent 975add1760
commit b925774eea
17 changed files with 395 additions and 1 deletions

5
examples/todo/.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,5 @@
# Track only the shared run configs; ignore per-user IDE state.
*
!.gitignore
!runConfigurations/
!runConfigurations/*.xml

View File

@@ -0,0 +1,17 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="make appimage" type="ShConfigurationType">
<option name="SCRIPT_TEXT" value="make appimage" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="" />
<option name="SCRIPT_OPTIONS" value="" />
<option name="INDEPENDENT_SCRIPT_WORKING_DIRECTORY" value="true" />
<option name="SCRIPT_WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="INDEPENDENT_INTERPRETER_PATH" value="true" />
<option name="INTERPRETER_PATH" value="/bin/bash" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="EXECUTE_IN_TERMINAL" value="true" />
<option name="EXECUTE_SCRIPT_FILE" value="false" />
<envs />
<method v="2" />
</configuration>
</component>

View File

@@ -0,0 +1,17 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="make dev" type="ShConfigurationType">
<option name="SCRIPT_TEXT" value="make dev" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="" />
<option name="SCRIPT_OPTIONS" value="" />
<option name="INDEPENDENT_SCRIPT_WORKING_DIRECTORY" value="true" />
<option name="SCRIPT_WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="INDEPENDENT_INTERPRETER_PATH" value="true" />
<option name="INTERPRETER_PATH" value="/bin/bash" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="EXECUTE_IN_TERMINAL" value="true" />
<option name="EXECUTE_SCRIPT_FILE" value="false" />
<envs />
<method v="2" />
</configuration>
</component>

View File

@@ -0,0 +1,17 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="make doctor" type="ShConfigurationType">
<option name="SCRIPT_TEXT" value="make doctor" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="" />
<option name="SCRIPT_OPTIONS" value="" />
<option name="INDEPENDENT_SCRIPT_WORKING_DIRECTORY" value="true" />
<option name="SCRIPT_WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="INDEPENDENT_INTERPRETER_PATH" value="true" />
<option name="INTERPRETER_PATH" value="/bin/bash" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="EXECUTE_IN_TERMINAL" value="true" />
<option name="EXECUTE_SCRIPT_FILE" value="false" />
<envs />
<method v="2" />
</configuration>
</component>

View File

@@ -0,0 +1,17 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="make quality" type="ShConfigurationType">
<option name="SCRIPT_TEXT" value="make quality" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="" />
<option name="SCRIPT_OPTIONS" value="" />
<option name="INDEPENDENT_SCRIPT_WORKING_DIRECTORY" value="true" />
<option name="SCRIPT_WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="INDEPENDENT_INTERPRETER_PATH" value="true" />
<option name="INTERPRETER_PATH" value="/bin/bash" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="EXECUTE_IN_TERMINAL" value="true" />
<option name="EXECUTE_SCRIPT_FILE" value="false" />
<envs />
<method v="2" />
</configuration>
</component>

41
examples/todo/.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,41 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug (Symfony / FrankenPHP)",
"type": "php",
"request": "launch",
"port": 9003,
"pathMappings": {
"${workspaceFolder}/symfony": "${workspaceFolder}/symfony"
},
"log": false
},
{
"name": "Run todo (Qt host)",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/qml/todo",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [
{ "name": "BRIDGE_URL", "value": "http://127.0.0.1:8765" },
{ "name": "BRIDGE_TOKEN", "value": "devtoken" }
],
"preLaunchTask": "make build",
"MIMode": "gdb",
"linux": { "MIMode": "gdb" },
"osx": { "MIMode": "lldb" }
}
],
"compounds": [
{
"name": "Dev: Xdebug + Qt host",
"configurations": [
"Listen for Xdebug (Symfony / FrankenPHP)",
"Run todo (Qt host)"
]
}
]
}

23
examples/todo/.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,23 @@
{
"files.exclude": {
"**/build": true,
"**/.qt": true,
"**/.rcc": true,
"**/var/cache": true,
"**/var/log": true,
"**/vendor": true,
"**/packaging/linux/tools": true
},
"search.exclude": {
"**/build": true,
"**/vendor": true,
"**/.qt": true,
"**/.rcc": true,
"**/packaging/linux/tools": true
},
"[php]": { "editor.tabSize": 4 },
"[qml]": { "editor.tabSize": 4 },
"[cpp]": { "editor.tabSize": 4 },
"intelephense.environment.phpVersion": "8.4.0",
"qt-qml.qmlls.useQmlImportPathEnvVar": true
}

50
examples/todo/.vscode/tasks.json vendored Normal file
View File

@@ -0,0 +1,50 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "make build",
"type": "shell",
"command": "make",
"args": ["build"],
"group": { "kind": "build", "isDefault": true },
"problemMatcher": ["$gcc"]
},
{
"label": "make dev",
"type": "shell",
"command": "make",
"args": ["dev"],
"isBackground": true,
"presentation": { "reveal": "always", "panel": "dedicated" },
"problemMatcher": []
},
{
"label": "make doctor",
"type": "shell",
"command": "make",
"args": ["doctor"],
"problemMatcher": []
},
{
"label": "make quality",
"type": "shell",
"command": "make",
"args": ["quality"],
"problemMatcher": ["$gcc"]
},
{
"label": "make integration",
"type": "shell",
"command": "make",
"args": ["integration"],
"problemMatcher": []
},
{
"label": "make appimage",
"type": "shell",
"command": "make",
"args": ["appimage"],
"problemMatcher": ["$gcc"]
}
]
}