<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Nick,<div><br></div><div>In the latest Chrome, you can choose to 'de-obfuscate source' in the context menu of the script tab in the developer tools.</div><div>That solves it mostly for me.</div><div><br></div><div>Johan</div><div><br></div><div><div><div>On 07 Aug 2011, at 12:40, Nick Ager wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi,<div><br></div><div>I wonder if other people suffer from the same problem when debugging javascript:<br><br>Seaside's response is viewed by browsers as a string without line-breaks.<br>Normally this isn't a problem as the browser "pretty-prints" the output when inspecting the html.<br>
However when debugging javascript, either inline or within a file-library the script debugger (I'm currently using Mac Safari) shows the output as a single line - which makes it impossible to interpret any javascript generated errors ("syntax error: line 1"!!) or to set meaningful breakpoints.<br>
<br>I've discovered that calling #withInternetLineEndings on the file-library string results in browsers interpreting the  line-endings as expected.<br><br>Locally when I'm debugging I've created a class derived from WAHtmlDocument, which overrides #nextPutAll: <br>
WAHtmlDocumentWithInternetLineEndings&gt;&gt;#nextPutAll: aString<br>&nbsp; &nbsp; super nextPutAll: aString withInternetLineEndings<br><br>and I modify WAFileLibrary&gt;&gt;#handle: modifying the WAResponse&gt;&gt;#document: to: <br>
document: ((self documentForFile: fileName) withInternetLineEndings)<br><br>Is there a better solution? Are there easier workarounds, browser settings etc.<br></div><div><br></div><div>I created an issue for this problem:&nbsp;<a href="http://code.google.com/p/seaside/issues/detail?id=675">http://code.google.com/p/seaside/issues/detail?id=675</a></div>
<div><br></div><div>Though if there are easy workaround that I've missed, I'd be delighted to close the issue.</div><div><br></div><div>Thanks</div><div><br></div><div>Nick</div>
_______________________________________________<br>seaside mailing list<br><a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside<br></blockquote></div><br></div></body></html>