This extension installs a Yii2 project template into the currently opened folder and runs one-command setup.
Commands
Yii2 Log Viewer: Install Template Into Current Folder
Extracts the embedded project template (resources/template.zip) into the currently opened folder
Then runs setup.ps1 from that folder
template.zip includes vendor/ for offline-first install
Prompts for a full path to php.exe (recommended)
Yii2 Log Viewer: Install Open Project
Runs setup.ps1 from the currently opened project root (no extraction)
Prompts for a full path to php.exe (recommended)
Yii2 Log Viewer: Open ADMINS NOTE
Opens resources/Admin.txt from the extension
Yii2 Log Viewer: Schema
Copies bundled sql/schema.sql into the opened folder (sql/schema.sql)
Works offline (file is inside the .vsix, no download from the internet)
If the file already exists, asks before replacing
Usage
Fresh install into an empty folder (recommended)
Create/open an empty folder in VS Code.
Run:
Ctrl+Shift+P → Yii2 Log Viewer: Install Template Into Current Folder
When prompted, set PHP path (OSPanel example):
C:\OSPanel\modules\php\PHP_8.1\php.exe
Wait until setup finishes in the terminal.
Install dependencies + import DB for an existing project
Open the existing project root in VS Code (the folder containing composer.json and setup.ps1).
Run:
Ctrl+Shift+P → Yii2 Log Viewer: Install Open Project
Provide PHP path when prompted.
Package and install locally
cd vscode-yii2-log-viewer-installer
npm install
npm run package
npm run package rebuilds resources/template.zip and resources/sql/schema.sql from the parent project (with vendor/) and creates yii2-log-viewer-installer-0.2.4.vsix.
Then install generated .vsix in VS Code:
Extensions panel -> ... -> Install from VSIX...
What setup.ps1 does
Installs PHP dependencies via Composer (composer install)
If composer is not in PATH, it downloads composer.phar into .tools/ and runs it using the provided php.exe
Imports the database from sql/schema.sql (creates DB cosmo, tables + reference data; vendor/ included for offline install)
It can auto-detect mysql.exe in OSPanel (or use MYSQL_EXE / -MySqlExe when running manually)