Community
Participate
Working Groups
Build Identifier: eclipse helios for java ee developers I don't find the "Rhino launching connector" in debug configurations, as stated here [url=http://www.eclipse.org/webtools/releases/3.2.0/NewAndNoteworthy/sourceediting.php] http://www.eclipse.org/webtools/releases/3.2.0/NewAndNotewor thy/sourceediting.php[/url] in the Epp for Java EE developers. Is it supposed to be here? I guess yes, it is part of WTP 3.2 after all. Reproducible: Always
I'm following this http://www.eclipse.org/webtools/releases/3.2.0/NewAndNoteworthy/sourceediting.php to see the new features of JSDT. For debugging a JS project only a "attaching connector" is available in the debug configurations. To deal with this i guess Rhino must be launched before. The only way i could do was "by hand" - a java standard run/debug configurations with "org.eclipse.wst.jsdt.debug.rhino.debugger.shell.DebugShell" as the Main class and, after a class load exception, of course, i added these jars in the "classpath" tab of the run configuration that i call "launch rhino": - org.eclipse.wst.jsdt.debug.rhino.debugger_xxx.jar - org.eclipse.wst.jsdt.debug.rhino_yyy.jar - org.mozzilla.javascript_zzz.jar from my eclipse's plugin folder. With this, Rhino launches and i can see the console printing: " Rhino attaching debugger Start at time: June 28, 2010 4:39:06 PM CEST Listening to socket on port: 9888 Rhino 1.7 release 2 2009 03 22 js> " But i can do nothing with my JS project. How can i debug it, how can i tell rhino to see my script files. I tried adding "-f D:\eclipseHelios_workspace\test-js\utils\alerts.js" in the "arguments" tab of my "rhino" launch configuration. Still nothing. (-f is documented here: (see here: https://developer.mozilla.org/en/Rhino_Shell)) I think that even if the connector is an attaching one, not a launching one, the js debug config should somehow expose the js project script files to rhino, as the "-f" rhino's comand does
(In reply to comment #1) > I'm following this > http://www.eclipse.org/webtools/releases/3.2.0/NewAndNoteworthy/sourceediting.php > to see the new features of JSDT. > For debugging a JS project only a "attaching connector" is available in the > debug configurations. > To deal with this i guess Rhino must be launched before. The only way i could > do was "by hand" - a java standard run/debug configurations with > "org.eclipse.wst.jsdt.debug.rhino.debugger.shell.DebugShell" as the Main class > and, after a class load exception, of course, i added these jars in the > "classpath" tab of the run configuration that i call "launch rhino": > - org.eclipse.wst.jsdt.debug.rhino.debugger_xxx.jar > - org.eclipse.wst.jsdt.debug.rhino_yyy.jar > - org.mozzilla.javascript_zzz.jar > from my eclipse's plugin folder. > With this, Rhino launches and i can see the console printing: > " > Rhino attaching debugger > Start at time: June 28, 2010 4:39:06 PM CEST > Listening to socket on port: 9888 > Rhino 1.7 release 2 2009 03 22 > js> > " > But i can do nothing with my JS project. How can i debug it, how can i tell > rhino to see my script files. I tried adding "-f > D:\eclipseHelios_workspace\test-js\utils\alerts.js" in the "arguments" tab of > my "rhino" launch configuration. Still nothing. > (-f is documented here: (see here: > https://developer.mozilla.org/en/Rhino_Shell)) > I think that even if the connector is an attaching one, not a launching one, > the js debug config should somehow expose the js project script files to rhino, > as the "-f" rhino's comand does
by the way, is there a button to launch rhino when using a "attaching connectpr" js debug config? should rhino be automatically launched when a "launching connector" js debug congif is run?
At the moment the Rhino Debugger only provides support for connecting to a remote rhino runtime that has integrated the debugger we provide. The one-click integrated launch/debug scenario like we have in Java has come up so frequently that we're looking at doing something for 3.2.1.
i don't understand. should there be a "launching connector" as specified in the url i gave? like "Eclipse Web Tools Platform 3.2 - New and Noteworthy " mentions? And anyway, i can't make, as shown in the screenshots, the script files appear as in the "Show All Scripts" section of the URL i gave - "Eclipse Web Tools Platform 3.2 - New and Noteworthy " i practically can't make him see the js projects scripts. what is the manipulation to do?
breakpoints are never hit because the scripts are never loaded. how are users suppose to use the js debugger in fact in eclipse?
(In reply to comment #5) > should there be a "launching connector" as specified in the url i gave? > like "Eclipse Web Tools Platform 3.2 - New and Noteworthy " mentions? There is a launching connector it is called: Mozilla Rhino - Attaching Connector The connector only allows you to connect to a running instance of Rhino, as Simon mentioned, it does not launch Rhino. The behavior is the same as the Java Remote Debug configurations - they are used to connect to another running process, they do not themselves launch a Java program. > And anyway, i can't make, as shown in the screenshots, the script files appear > as in the "Show All Scripts" section of the URL i gave - Launching Rhino using the console requires you to load scripts from the console - i.e. you have to use the 'load' command to load scripts. for example once you see: Rhino 1.7 release 2 2009 03 22 js> you can enter: Rhino 1.7 release 2 2009 03 22 js>load("absolute/script/path/<myscript>.js") and that will load the script <myscript>.js into Rhino, allowing you to debug it. > what is the manipulation to do? We are currently working on "single-click" launching support which would allow you to simply select a script in the explorer (or editor) and debug it with one mouse click. For more info on that enhancement see bug 289107. Hope this helps.
well, looking at this: http://wiki.eclipse.org/JSDT/Debug/JavaScript_Debug_Interface#Connectors it is more an "attaching connector", as its own label says, not a launching one. also, launching the rhino console is not documented at all. loading scripts also is omitted from the "new and noteworthy", even if it is documented on the rhino website. is there a step by step introduction to debugging js with eclipse? what about this: http://www.eclipse.org/atf/flash/index4.php how is this working without rhino? thanks for the replies.
(In reply to comment #8) > it is more an "attaching connector", as its own label says, not a launching > one. A "launching connector" as mentioned in the NaN, abstractly describes a connector used when launching a JavaScript launch configuration, it is NOT describing a particular kind of connector. > > also, launching the rhino console is not documented at all. You are correct. > loading scripts also is omitted from the "new and noteworthy", even if it is > documented on the rhino website. > > is there a step by step introduction to debugging js with eclipse? No. Our documentation is lacking to say the least. > what about this: http://www.eclipse.org/atf/flash/index4.php > how is this working without rhino? I have no idea how ATF works, you would have to ask them.
Attaching Connector - Connects to an already running VM Launching Connector - Launches a VM and connects to it this is so self explanatory: a java-equivalent javascript "launching connector" would launch the script interpreter (rhino) - the equivalent of the JVM.
a launching connector does what an attaching one does + (before that even) launches rhino
I've updated the N&N document. Let's focus on the improvement of the overall usability and doc in bug 289107.