Hi,
On 17.10.2010 20:34, Justin Edelson wrote:
> On Sun, Oct 17, 2010 at 2:28 PM, Felix Meschberger <[email protected]> wrote:
>> Hi,
>>
>> On 17.10.2010 16:05, Sandro Boehme wrote:
>>> Hi Felix,
>>>
>>> thanks for the feedback.
>>> The Swing debugger GUI doesn't seem to work in this case as it cannot
>>> open e.g. the explorer.esp file. It says:
>>> "Syntax error (.../explorer.esp#83)"
>>> This refers to the line containing only "<form action="#">" which is
>>> correct in my opinion.
>>
>> I would expect the line to be correct, but I must admit to not have used
>> this for quite some time, so ... this may really not properly work
>> (unfortunately).
>>
>>>
>>> I also tried the "Eclipse IDE for JavaScript Web Developers" from
>>> http://www.eclipse.org/downloads/ as it contains debugging support for
>>> Rhino (http://wiki.eclipse.org/JSDT/Debug). But it doesn't work out of
>>> the box. Even though it is based on JPDA I guess there needs to be
>>> something Rhino specific installed on the serverside.
>>
>> Sounds interesting. Would be exactly what I had in mind ;-) Will
>> investigate.
>
> It'd be better if this page wasn't blank:
> http://wiki.eclipse.org/JSDT/Debug/Embedding_Rhino_Debugger
Yes, well, I got it sort of working with a bit hacking ....
1. deploy two JSDT bundles into Sling:
org.eclipse.wst.jsdt.debug.rhino.debugger
org.eclipse.wst.jsdt.debug.transport
(ignore for now that these bundles use Require-Bundle
and export internals ...)
2. upgrade Sling Rhino reference to 1.7R2
3. inside Sling add a dependency to the
org.eclipse.wst.jsdt.debug.rhino.debugger project checked
out from Eclipse CVS
4. In the SlingContextFactory constructor instantiate a RhinoDebugger
with a connector string (e.g.
"transport=socket,suspend=n,address=9000"), register it as a
listener and start the RhinoDebugger
5. Export org.mozilla.javascript.debugger package and add an
optional import to org.eclipse.wst.jsdt.debug.rhino.debugger in
the pom.xml
6. build and install the Sling Javascript bundle
Now you can connect to this Debugger with Eclipse ... And yes, I can
connect but I cannot yet cope with filenames...
I create a project and a folder linked to a WebDAV mounted Sling folder
and can then set breakpoints. The problem is, that Eclipse seems to
prefix all script names with the project and folder name and thus is not
able to match the names of executed scripts to apply break points ...
Regards
Felix
>
> Justin
>>
>> Regards
>> Felix
>>
>>>
>>> Best,
>>>
>>> Sandro
>>>
>>> Am 16.10.10 20:22, schrieb Felix Meschberger:
>>>> Hi Sandro,
>>>>
>>>> The best solution (which I once considered working on a long time ago
>>>> but never got around to implement) is to have Rhino debugging support in
>>>> Eclipse.
>>>>
>>>> But for now, you may set the
>>>> "org.apache.sling.scripting.javascript.debug" framework property (e.g.
>>>> in the sling.properties file) to true. When this property is set to true
>>>> Rhino will launch the Swing debugger GUI (on the server system) once the
>>>> Rhino ScriptEngineFactory is started.
>>>>
>>>> Regards
>>>> Felix
>>>>
>>>>
>>>> On 16.10.2010 15:36, Sandro Boehme wrote:
>>>>> Hello,
>>>>>
>>>>> I'm trying to get into the Sling Explorer and I'm wondering how (or if)
>>>>> you guys debug these esp scripts? While the Eclipse debugger stops in
>>>>> jsp files it doesn't stop in esp files as they don't contain Java code.
>>>>> Is there a special JSR-223 debugger plugin or some trick I don't know
>>>>> of?
>>>>>
>>>>> Best,
>>>>>
>>>>> Sandro
>>>>>
>>>>
>>>
>>>
>>
>