downthemall/anticontainer — Issue #41: Have Debug Option to Assist in Developing
Author: Kmon
Created: 2011-11-15 19:28:03+00:00
State: open

I am working on the following plugin:
```
{
"type": "resolver",
"ns": "krohn.ky",
"author": "kmon",
"prefix": "egotastic.com",
"priority": 10,
"match": "^http://egotastic\\.com[/]+full-size-image/[0-9]+",
"static": true,
"finder": "src=['\"](http://cdn[0-9]+\\.cdn\\.egotastic\\.com/wp-content/uploads/[0-9]+/[0-9]+/.*?)['\"] class=\"attachment-large\"",
"builder": "{1}",
"debug": true
}
```
This is SUPPOSED to get the bottom images from source pages such as: http://egotastic.com/2011/11/reader-finds-kelly-kelly-covered-topless-geri-halliwell-teen-naughty-taylor-swift-bikini-top-olivia-wilde-private-pics-and-much-more/ but for the life of me I can't get it to work. All I get is the "Failed to extract from container" error. I have verified that it is getting the correct page (HTTP result 200), that the regex is correct (using a regex tester) and that no errors are thrown (by turning on the debug logging).

I am now out of places to look for the cause of the failure. It would be awesome if we could have something that would give us a lot more information during the development process for the plugin. Then once it was working we could turn it off. I noticed in the code the following block in the manager.js:

```javascript
let m = obj.finder.exec(this.responseText);
if (obj.debug) {
alert(obj.finder)
alert(this.responseText);
alert("m:" + m);
}
```

So, I added the debug option to my JSON above but didn't get anything. Could this be added? And if you have any suggestions for my plugin, that would be great too.