Wednesday, July 29, 2015

Code Highlighting for Blogger

I don't want to change my template. I don't want to pull in the code via JavaScript like gist embedding does. I just want an HTML snippet of formatted code compatible with blogger. Today I'm using to format my code. Anyone using anything better?

PHPStorm + xdebug + ScotchBox 2.0

ScotchBox 2.0, by design, does not have xdebug installed. They give the following install instructions:

sudo apt-get install php5-xdebug
sudo service apache2 restart

Which works as far as it goes, but even successfully using PHPStorm's "Web Server Debug Validation", and installing and using the Xdebug bookmarklet, I was not able to get the debugger working.

This post gave me the insight that I needed, so I added the following code to the end of my php.ini (sudo nano /etc/php5/apache2/php.ini).


Restart apache (sudo service apache2 restart), run PHPStorm's "Web Server Debug Validation" again, and Bob's your uncle.

Thanks to Joao Paulo for making it simplier.