Skip to content

Instantly share code, notes, and snippets.

@bgrins
Last active March 17, 2016 15:28
Show Gist options
  • Save bgrins/6595824 to your computer and use it in GitHub Desktop.
Save bgrins/6595824 to your computer and use it in GitHub Desktop.
Start firefox in a loop, allowing you to quit and have it auto rebuild devtools and restart.
# Start firefox in a loop, allowing you to quit and have it auto rebuild devtools and restart.
if [ -f mach ];
then
echo "mach exists. Starting loop."
trap "exit" SIGHUP SIGINT SIGTERM
while true
do
./mach build faster
./mach run --devtools --jsconsole -P dev
done
else
echo "mach does not exist in current directory. Bailing out."
fi
@captainbrosset
Copy link

That helps, for sure.
One change I'd make though is build with ./mach build browser/devtools cause that's what I end up doing 90% of the time. And for the other 10%, I could just ctrl+C and build manually.
Also, it would work at first without #!/bin/sh at the top.
Thanks!

@helenvholmes
Copy link

Is there a flag for opening up the devtools inspector instead of the js console if I wanted to modify this a bit?

@reepush
Copy link

reepush commented Dec 5, 2015

@helenvholmes you can use --jsdebugger to open Browser Toolbox

@jasonLaster
Copy link

It's nice to add a cd at the top to move into the folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment