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

Forum Home


advanced search


You are not logged in.

Announcement

When reporting a problem or a bug :
* Provide your OS version (INCLUDING service pack) and installed IE version.
* Provide your IETester version
* Provide the IE Tab version opened to generate the problem
* Provide a test case with a sample url or sample code to reproduce the problem
* Provide a step by step explanation on how to reproduce the problem.
* If needed provide additional information.

Thanks.

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

sly
New member
Registered: 2008-10-14
Posts: 4

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 13:46:34

fabrice
DebugBar Support
From: San Francisco, CA, USA
Registered: 2007-11-08
Posts: 1182
Website

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 14:03:37

sly
New member
Registered: 2008-10-14
Posts: 4

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 14:07:12

fabrice
DebugBar Support
From: San Francisco, CA, USA
Registered: 2007-11-08
Posts: 1182
Website

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 14:22:16

sly
New member
Registered: 2008-10-14
Posts: 4

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 14:30:17)

Offline

 

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

fabrice
DebugBar Support
From: San Francisco, CA, USA
Registered: 2007-11-08
Posts: 1182
Website

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 15:14:09

sly
New member
Registered: 2008-10-14
Posts: 4

Re: console.log() to log multiline text

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

Offline

 

Partners : Debugbar | Mobilier de bureau | Debugbar Wiki | IEForge | Lampes design | La fourmi créative