I'm logging A HUGE amount of sessions as part of some troubleshooting and fiddler is becoming very slow to respond (in some cases unusable) as a result. My thinking of working around this was to get Fiddler to save the sessions to a file every x sessions then clear the list.
My FiddlerScript looks like this (this should save every 100 sessions to a file, though when it works I will increase this number):
//---------------------BEGIN FIDDLERSCRIPT EXCERPT---------------------
var numberOfLoggedSessions: int = 0;
var savedArchivesCount: int = 0;
class Handlers
{
...
static function OnDone(oSession: Session) {
if (numberOfLoggedSessions > 98) {
FiddlerApplication.UI.actSelectAll();
numberOfLoggedSessions = 0;
var sessionsToSave: Session[] = FiddlerApplication.UI.GetSelectedSessions();
savedArchivesCount ++;
FiddlerApplication.UI.actSaveSessionsToZip("C:\\Users\\storage\\Desktop\\" + savedArchivesCount + ".saz");
FiddlerApplication.UI.actRemoveSelectedSessions();
} else {
numberOfLoggedSessions ++;
}
}
...
}
//---------------------END FIDDLERSCRIPT EXCERPT---------------------
When I test it, it seems to work, so I leave it for a bit and eventually come back and see an error message that I don't understand:
There was a problem with your FiddlerScript.
Number of selected items does not match actual selected items.
at
System.Windows.Forms.ListView.SelectedListViewItemCollection.get_SelectedItemArray()
at
System.Windows.Forms.ListView.SelectedListViewItemCollection.CopyTo(Array dest, Int32 index)
at Fiddler.frmViewer.WeakStoreWebSessionsBeforeDelete(Object oLVIC)
at Fiddler.frmViewer.actRemoveSelectedSessions()
at Fiddler.ScriptNamespace.Handlers.OnDone(Session oSession)
at Fiddler.FiddlerScript.DoSessionCompleted(Session oSession)
Do you have any ideas what's going wrong?
My FiddlerScript looks like this (this should save every 100 sessions to a file, though when it works I will increase this number):
//---------------------BEGIN FIDDLERSCRIPT EXCERPT---------------------
var numberOfLoggedSessions: int = 0;
var savedArchivesCount: int = 0;
class Handlers
{
...
static function OnDone(oSession: Session) {
if (numberOfLoggedSessions > 98) {
FiddlerApplication.UI.actSelectAll();
numberOfLoggedSessions = 0;
var sessionsToSave: Session[] = FiddlerApplication.UI.GetSelectedSessions();
savedArchivesCount ++;
FiddlerApplication.UI.actSaveSessionsToZip("C:\\Users\\storage\\Desktop\\" + savedArchivesCount + ".saz");
FiddlerApplication.UI.actRemoveSelectedSessions();
} else {
numberOfLoggedSessions ++;
}
}
...
}
//---------------------END FIDDLERSCRIPT EXCERPT---------------------
When I test it, it seems to work, so I leave it for a bit and eventually come back and see an error message that I don't understand:
There was a problem with your FiddlerScript.
Number of selected items does not match actual selected items.
at
System.Windows.Forms.ListView.SelectedListViewItemCollection.get_SelectedItemArray()
at
System.Windows.Forms.ListView.SelectedListViewItemCollection.CopyTo(Array dest, Int32 index)
at Fiddler.frmViewer.WeakStoreWebSessionsBeforeDelete(Object oLVIC)
at Fiddler.frmViewer.actRemoveSelectedSessions()
at Fiddler.ScriptNamespace.Handlers.OnDone(Session oSession)
at Fiddler.FiddlerScript.DoSessionCompleted(Session oSession)
Do you have any ideas what's going wrong?