debug-single.ps1 813 B

12345678910111213141516171819202122
  1. $SkillsRoot = "e:\workspace\openclaw-voc-skill"
  2. $catPath = Join-Path $SkillsRoot "voc"
  3. Get-ChildItem -Recurse -Filter "api-config.json" -Path $catPath | Select-Object -First 1 | ForEach-Object {
  4. $filePath = $_.FullName
  5. Write-Host "File: $filePath"
  6. $content = Get-Content -Path $filePath -Raw -Encoding UTF8
  7. Write-Host "Content null: $($null -eq $content)"
  8. Write-Host "Content length: $($content.Length)"
  9. $search = '"tokenConfig"'
  10. Write-Host "Search string length: $($search.Length)"
  11. Write-Host "Search string chars: $(($search.ToCharArray() | ForEach-Object { [int]$_ }) -join ',')"
  12. $idx = $content.IndexOf($search)
  13. Write-Host "IndexOf result: $idx"
  14. # Also try without quotes
  15. $idx2 = $content.IndexOf("tokenConfig")
  16. Write-Host "IndexOf no-quotes: $idx2"
  17. }