I have several debug printouts in my script with console.log(message), but no messages displayed in Console section of Firebug.
What can be a reason for this?
UPDATE 1
Neither of console.warn, console.error and console.info works.
UPDATE 2
I have a following log function:
function log(message) {
console.error(message);
$("#log").append(message + "<br/>");
}
so it logs both into Firebug console and DIV on page. I see that DIV logging works. Hence the control reaches the statements.
UPDATE 3
–irrelevant–
UPDATE 4
Update 3 was irrelevant: consoleBody in firebug.js was not always null. Later it was becoming valued.
But I saw that the content of consoleBody contains “div#log”. Probably it interferes with my naming…
UPDATE 5
Renaming of ID of my DIV didn’t help…
UPDATE 6
Whe I do console.log("hehe") in immediate line of firebug, it prints undefined
UPDATE 7
Looks like console.log() does not work within Liferay portlet at all; even very simple hello world portlet does not excecute this command.
I’m not sure what’s the reason for such behaviour for 6.0 version but I have found the reason it doesn’t work in 5.2.3.
It seems that Liferay includes Firebug Lite on my page and when I press F12 it appears at the bottom. It does interceps console method calls.
Now I’m looking for correct way to remove the included script.
EDIT:
Seems like the reason for this is that I have developer mode enabled.
set JAVA_OPTS=%JAVA_OPTS% -Dexternal-properties=portal-developer.properties