kashiwazakinenji / chromedevtools

Automatically exported from code.google.com/p/chromedevtools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

console.log writes to eclipse console #43

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Title says it all.  

Would also be interested in any work-arounds as the remote debug appears to 
disable the native chrome dev tools.

Original issue reported on code.google.com by al2...@gmail.com on 10 Apr 2011 at 6:30

GoogleCodeExporter commented 8 years ago
Still "expected/actual" form is more preferred.

Original comment by peter.ry...@gmail.com on 10 Apr 2011 at 6:52

GoogleCodeExporter commented 8 years ago
I have been on JavaScript since Two Yrs.
The problem what i have is, I can run and see the console.log("Some Thing") in 
Chrome Browser which i run in my system.
But if use the same HTML page and JavaScript and runs in Eclipse then the 
console.log("Some Thing") is not displaying "Some Thing".

----------
myJS.js
----------
function product(a,b)
{
alert(a + "  " + b);
console.log( a+" and " +b);
return a*b;
}
-----------
index.html
-----------
<html>
<head>
<script type="text/javascript" src="myJS.js">
</script>
</head>
<body>
<script type="text/javascript">
document.write(product(4,3));
console.log("console " + " " + " here ");
</script>
</body>
</html>

Thanks and Regards
Kranti Kumar 

Original comment by kranthi4...@gmail.com on 14 Apr 2011 at 11:49

GoogleCodeExporter commented 8 years ago
I'm not quite sure if this issue is intended to describe an existing or prior 
bug or if it's a feature request.

However, using ChromeDevTools 3.4 with Chrome 18.0.1025.168 and Eclipse 3.7 
using WIP 1.0, I DO NOT see browser console messages echoed to the Eclipse 
console.  (I wish I did, in fact.)

When the debugger is enabled, it's impossible to see browser console output 
anywhere, as enabling Web Inspector in Chrome disables the remote debugger, at 
present.  I would love to either see the browser console echoed to a console 
session in Eclipse, or be able to use Web Inspector while debugging.

As a very hacky work around, I wrote an Eclipse plugin that launches a 
WebSocket server and echoes anything sent to it to the Eclipse console, along 
with a Javascript include that instruments console.log to effect the 
redirection.  To display filenames and lineNo in the eclipse console, I sadly 
have to parse a stack trace from a new Error in the javascript, which just 
feels slow and dirty, and the instrumented console.log, of course, now doesn't 
display the proper filename or lineNo when displayed in the native Web 
Inspector, as they're masked by the new console.log functions location.  And, I 
hate having to inject a stupid websocket-remote-console.js file into any page I 
want to debug.  I would much rather the ChromeDevTools allow for console 
viewing inherently.

And if I were to get all my wishes, an Eclipse "remote browser console" would 
be a REPL, executing any commands given in the browser page context, and 
clicking on any console message would jump, locally in Eclipse, to the source 
line that triggered it. 

Failing that, if the debugger allowed concurrent access to a page on the chrome 
debugging port, then we could easily just have the Eclipse internal browser 
point to the debugging port and show the Web Inspector in all it's REPL-ly 
goodness. 

So, if this Issue is meant to be a feature request for "browser console echoed 
to eclipse console," I second it.  If, rather, it's claiming a bug that the 
browser console IS echoed to the eclipse console, then it's sadly been fixed 
already.

Original comment by sejm...@gmail.com on 2 May 2012 at 4:51

GoogleCodeExporter commented 8 years ago

Original comment by peter.ry...@gmail.com on 2 May 2012 at 4:16

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi,

As a possible solution you can integrate the plugin logViewer 
(https://code.google.com/a/eclipselabs.org/p/logviewer/downloads/detail?name=Ecl
ipseLogViewer_0.9.8.8.zip&can=2&q=), enabling the log in chrome (1)

When you have installed the plugin, load the chrome log file in eclipse doing 
File-> Load Log Viewer "% LOCALAPPDATA%\Google\Chrome\User 
Data\chrome_debug.log"

(1) Note: To generate the log file (chrome_debug.log) executing chrome with the 
parameter --enable-logging --v=1

Best Regards

Original comment by jespa...@gmail.com on 10 May 2013 at 9:00

GoogleCodeExporter commented 8 years ago
Hello, 
Console is an essential part of debugging. Console logs showing in eclipse 
console would be highly appreciated

Original comment by yassine....@gmail.com on 2 Oct 2013 at 2:39