Hi,
when trying to
a) getting familiar with blockly
b) debugging code added to original source
it's kind of hard to track down problems, especially when using blockly_compressed.js.
I've put together a shell script that parses build.sh and creates a loader .js to use the original source for custom projects. and you just have to exchange blockly_compressed.js to blockly_debug_loader.js in the html.
With this, it's more convenient to debug the app you're developing with blockly. (E.g. when clicking somewhere on the canvas while profiling is running, you can see what functions were called).
--
greg
------------------------------
# relative path to build.sh
BUILD_SH_FILE=../build.sh
# the content of the js src loader file -- optional: change path to original source files in 'src' attribute
inc='function __include(file) {\r\n\tdocument.write("<script type='"'text/javascript' src='"'../"+file+"'"'></script>"'"'');\r\n}\r\n\r\n'
# load original build.sh to know which files were 'compressed' // demos/blockly_compressed.js excluded
buildSH=`cat ${BUILD_SH_FILE} | grep -Po "\S*\.js" | grep -Po "^[^/]*\.js"`
#iterate through 'compressed' .js files
for f in $buildSH
do
inc="$inc __include('$f');\r\n"
done
# save the loader file
echo "$inc" > blockly_debug_loader.js