You can use this sed
,
sed 'N; s/)[ ]*\n{/&\npr_debug();/g'
(OR)
sed '/(.*)[ ]*$/{N; s/)[ ]*\n[ ]*{/&\npr_debug();/g}'
Explanation:
N - will read next line and append
s/pattern/replace/ - normal substitution takes place
& - will replace with what exactly matched in pattern
EDIT: the find command:
find . -type f -exec sed -i '/(.*)[ ]*$/{N; s/)[ ]*\n[ ]*{/&\npr_debug();/g}' {} \;