Greasemonkeyスクリプトのデバッグ方法
Firefoxで、Greasemonkeyスクリプトを効率よくデバッグする方法を知らないので、
Greasemonkeyスクリプトを書く場合Google chrome extensionとして書き、テストとかをしてます。
extensionと言ってもパッケージ化等は全くしてませんし、内容も特に違いはありませんが。
3gokushi-beyondを例として書きます
任意のディレクトリにmanifest.jsonと3gokushi-beyond.user.jsファイルを入れるだけ。
manifest.jsonの内容はこんなの
{ "content_scripts": [ { "exclude_globs": [ ], "include_globs": [ "http://*.3gokushi.jp/*", "https://*.3gokushi.jp/*"], "js": [ "3gokushi-beyond.user.js" ], "matches": [ "http://*/*", "https://*/*" ] } ], "description": "browser 3gokushi beyond user script ", "name": "3gokushi-Beyond", "version": "1.28.1.7" }
あとはこのディレクトリをデベロッパモードにした拡張機能から2つのファイルを入れたディレクトリを選択し読み込ませる。
たったこれだけです。Google Chromeだと標準機能のDeveloper Toolsが使えて便利です。
Firefoxの場合firebugがあるけれど、firebugでGreasemonkeyスクリプトをデバッグする方法がわからない・・・。それに4.0だと重いし。
どなたかFirefoxでGreasemonkeyスクリプトをデバッグする便利な方法しりませんか?
主に使いたい機能はbreakやらvalue内容みたりとかなのですが。