DebugBar Forums
 
 HOME 
 DOWNLOAD 
 BUY 
 DOC / WIKI 
 FORUM 
 CONTACT 
Stay tuned : rss feed

Forum Home


advanced search

You are not logged in.

Announcement

Forums are now closed as we moved them to google groups. You can use the following Google Groups to discuss about DebugBar and IETester products:

#1 2008-10-14 11:12:05

sly
New member

console.log() to log multiline text

is there a way to log a multiline message? line breaks are ignored (\n), but in the same time tabulation \t works just fine.

Offline

 

#2 2008-10-14 11:46:34

fabrice
DebugBar Support

Re: console.log() to log multiline text

Hi,

It is working on my side.

Code:

console.log('test\nline 2\nline 3\nline4');

is generating 4 lines.

Offline

 

#3 2008-10-14 12:03:37

sly
New member

Re: console.log() to log multiline text

this code rendered to a single line in my environment:  testline 2line 3line4. What can I do to help you figure out this issue?

Offline

 

#4 2008-10-14 12:07:12

fabrice
DebugBar Support

Re: console.log() to log multiline text

Give me more information : What is your OS version, what is your IE version ?

Are you trying this code from the console ? from a web page ? is there a public web page where you have the problem so I can reproduce it ?

Thanks.

Offline

 

#5 2008-10-14 12:22:16

sly
New member

Re: console.log() to log multiline text

windows 2003 server R2 standard x64 SP2
IE 7.0.5730.13 (x32 process instance)


The issue is reproducible by a local file with the following content:

Code:

 <html>
<body>
<script>
console.log('test\nline 2\nline 3\nline4');
</script>
</body>
</html>

as i said, \t was displayed as tabulation. I have a suspection, it might help you:

Code:

console.log('test\\n a lot of text goes here');

will be displayed as:

Code:

Console [16]=     
 testa lot of text goes here

note the double slashes in the original string, they and the following 'n' symbol aren't in the output.


Code:

console.log('\\');

is displayed as:

Console [24]=     
\par

Last edited by sly (2008-10-14 12:30:17)

Offline

 

#6 2008-10-14 13:09:25

fabrice
DebugBar Support

Re: console.log() to log multiline text

Sorry !

I did some minor changes for the next Companion.JS release, and one of those changes corrected this bug. That's why it is working on my box !

So, your problem will be fixed on the next Companion.JS release :-)

Offline

 

#7 2008-10-14 13:14:09

sly
New member

Re: console.log() to log multiline text

thanks, I'm looking forward for the update :-) Thank you for the great tool!

Offline