So i figure out how to enable collecting it. It's quite easy - just set up some keys in registry (for Windows 7 at least).
As Chef powershell resource it can be written as:
powershell "enable crash reports for IEDriverServer" doIn result if IEDriverServer crashes a new file .dmp will be created.
code <<-EOH
if (Test-Path "HKLM:\\SOFTWARE\\Microsoft\\Windows\\Windows Error Reporting\\LocalDumps") {
} else {
New-Item "HKLM:\\SOFTWARE\\Microsoft\\Windows\\Windows Error Reporting\\LocalDumps"
}
if (Test-Path "HKLM:\\SOFTWARE\\Microsoft\\Windows\\Windows Error Reporting\\LocalDumps\\IEDriverServer.exe") {
} else {
New-Item "HKLM:\\SOFTWARE\\Microsoft\\Windows\\Windows Error Reporting\\LocalDumps\\IEDriverServer.exe"
}
Set-ItemProperty "HKLM:\\SOFTWARE\\Microsoft\\Windows\\Windows Error Reporting\\LocalDumps\\IEDriverServer.exe" -Name DumpCount -Value 10
Set-ItemProperty "HKLM:\\SOFTWARE\\Microsoft\\Windows\\Windows Error Reporting\\LocalDumps\\IEDriverServer.exe" -Name DumpType -Value 2
Set-ItemProperty "HKLM:\\SOFTWARE\\Microsoft\\Windows\\Windows Error Reporting\\LocalDumps\\IEDriverServer.exe" -Name DumpFolder -Value "C:\\iedriverserver_crash\\"
EOH
end
After that using MS Visual Studio and debug files as *.pdb which are generated during iedriver building (may require renaming IEDriver.dll to something as IED89D.tmp for proper symbols loading) you can investigate crash stacktrace, local variables etc.
Комментариев нет:
Отправить комментарий