Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 318186 - [jsdt] Rhino "launching connector" missing in "Java EE EPP" js debug config, only "attaching connector" present
Summary: [jsdt] Rhino "launching connector" missing in "Java EE EPP" js debug config, ...
Status: RESOLVED FIXED
Alias: None
Product: JSDT
Classification: WebTools
Component: Debug (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.2.1   Edit
Assignee: Nitin Dahyabhai CLA
QA Contact: Simon Kaegi CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-28 10:32 EDT by vlad.balan Mising name CLA
Modified: 2010-06-28 15:37 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vlad.balan Mising name CLA 2010-06-28 10:32:51 EDT
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
Comment 1 vlad.balan Mising name CLA 2010-06-28 10:48:33 EDT
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
Comment 2 vlad.balan Mising name CLA 2010-06-28 10:50:36 EDT
(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
Comment 3 vlad.balan Mising name CLA 2010-06-28 12:15:45 EDT
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?
Comment 4 Simon Kaegi CLA 2010-06-28 14:01:19 EDT
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.
Comment 5 vlad.balan Mising name CLA 2010-06-28 14:17:59 EDT
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?
Comment 6 vlad.balan Mising name CLA 2010-06-28 14:19:52 EDT
breakpoints are never hit because the scripts are never loaded.

how are users suppose to use the js debugger in fact in eclipse?
Comment 7 Michael Rennie CLA 2010-06-28 14:39:33 EDT
(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.
Comment 8 vlad.balan Mising name CLA 2010-06-28 15:05:42 EDT
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.
Comment 9 Michael Rennie CLA 2010-06-28 15:15:23 EDT
(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.
Comment 10 vlad.balan Mising name CLA 2010-06-28 15:21:53 EDT
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.
Comment 11 vlad.balan Mising name CLA 2010-06-28 15:23:09 EDT
a launching connector does what an attaching one does + (before that even) launches rhino
Comment 12 Nitin Dahyabhai CLA 2010-06-28 15:37:38 EDT
I've updated the N&N document.  Let's focus on the improvement of the overall usability and doc in bug 289107.