A Symfony 1.3 Gem: Open Files Listed in Exceptions with the Editor of your Choice
Par NiKo le lundi 12 octobre 2009, 18:22 - Dev
- Lien permanent -
5 commentaires -
Tags :
I’ve just stumbled upon a nice new feature of Symfony 1.3, the ability to open any linked file within standard exception page with the text editor of your choice, at least if it provides an url scheme/protocol to open them. Texmate provides natively this feature, so let’s see how to configure a symfony project to allow its files to be opened directly in textmate when encountering a stack trace.
In the config/ folder of the project, create a settings.yml file with this content:
yml
dev: #yeah, we never know
.settings:
file_link_format: "txmt://open?url=file://%f&line=%l"
That’s it. Now any standard exception page (in dev environment only, right?) will provide a txmt:// link to every PHP file listed in the stack trace. And at the correct line number. Neat.
5 commentaires (Ajouter un commentaire)
ya pas un risque de se retrouver avec 30 fichiers ouverts d'un coup à chaque exception alors que l'ouverture d’1 ou 2 fichiers t'aurait suffi pour corriger le pb non ?
ps: cela dit je fais mon casse noix parce que c'est quand même un feature super puissant
ps2: je suis preneur pour une solution avec vim
Any clue on how to do this with the NetBeans IDE?
Yeah ça roxe ça, je vais tester cette killer feature right now
Hé hé, excellent ! Il va falloir que je trouve une manière de faire la même chose dans vim car c'est clairement une killer-feature.
Quelqu'un a une piste pour enregistrer un protocol handler (pas trouvé de traduction convenable ...) sous OSX, XFCE et/ou gnome ?
Excellent merci d'avoir partagé ceci