Register alpha.0 B4A prototype
This commit is contained in:
31
tools/watch-logcat.ps1
Normal file
31
tools/watch-logcat.ps1
Normal file
@@ -0,0 +1,31 @@
|
||||
param(
|
||||
[string]$ProjectRoot = (Resolve-Path "$PSScriptRoot\..").Path,
|
||||
[string]$AdbPath = "C:\android\platform-tools\adb.exe",
|
||||
[string]$PackageName = "anywheresoftware.b4a.swarm",
|
||||
[switch]$KeepExisting
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
if (-not (Test-Path -LiteralPath $AdbPath)) {
|
||||
throw "adb.exe non trovato: $AdbPath"
|
||||
}
|
||||
|
||||
$logDir = Join-Path $ProjectRoot "logs"
|
||||
New-Item -ItemType Directory -Force -Path $logDir | Out-Null
|
||||
|
||||
$stamp = Get-Date -Format "yyyyMMdd-HHmmss"
|
||||
$logFile = Join-Path $logDir "logcat-$stamp.txt"
|
||||
|
||||
& $AdbPath wait-for-device
|
||||
|
||||
if (-not $KeepExisting) {
|
||||
& $AdbPath logcat -c
|
||||
}
|
||||
|
||||
Write-Host "Logcat live. Premi Ctrl+C per fermare."
|
||||
Write-Host "File: $logFile"
|
||||
Write-Host "Filtro mentale utile: cerca '$PackageName', 'AndroidRuntime', 'FATAL EXCEPTION', 'System.err', 'B4A'."
|
||||
Write-Host ""
|
||||
|
||||
& $AdbPath logcat -v time | Tee-Object -FilePath $logFile
|
||||
Reference in New Issue
Block a user