You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Sandro Boehme <sa...@gmx.de> on 2010/12/02 15:39:45 UTC

Scala debugger

Hello,

reading http://www.scala-lang.org/node/5257 I assume I can use the 
debugger for the Scala scripts in Sling. I can indeed attach to the 
debugger, set a breakpoint and the debugger will start at the specified 
position. What I can not get to work is: attaching the source correctly. 
I tried it with the hello world project and used:
o The source directory from the generated Eclipse project
o All levels of directories as source directories in a mounted WebDAV 
directoy between '/' and '/apps/helloworld'

Does somebody have an idea how to attach the source correctly?

Best,

Sandro

Re: Scala debugger

Posted by Michael Dürig <md...@adobe.com>.
Hi Sandro,

I was able to step through the script source code inside the Eclipse 
debugger once. However, it did not try this again for quite some time 
now. So it might well be that some changes made attaching the debugger 
more difficult/troublesome. I still think it should be possible though...

Michael

On 27.12.10 2:10, Sandro Boehme wrote:
> Michael,
>
> I debugged the debugger (JavaDebugUtils.java:128) and for me it looks
> like the debugger is looking for a file named
> "helloworld/helloworld.html" when I set a breakpoint at "html.scala".
>
> Are you sure it is possible to attach a scala script source to the debugger?
>
> Best,
>
> Sandro
>
> Am 07.12.10 17:16, schrieb Michael Dürig:
>>
>> Sandro,
>>
>> Getting the sources attached is a bit tricky. The actual script sources
>> are in the resource folder (since they are resources bundled into
>> Sling). So if you want to step through the script source it should be
>> possible by telling Eclipse to look into the appropriate folder under
>> main/resources. In the case of the hello word module that would be
>> hello-world/src/main/resources/content/apps
>>
>> Michael
>>
>>
>> On 2.12.10 15:39, Sandro Boehme wrote:
>>> Hello,
>>>
>>> reading http://www.scala-lang.org/node/5257 I assume I can use the
>>> debugger for the Scala scripts in Sling. I can indeed attach to the
>>> debugger, set a breakpoint and the debugger will start at the specified
>>> position. What I can not get to work is: attaching the source correctly.
>>> I tried it with the hello world project and used:
>>> o The source directory from the generated Eclipse project
>>> o All levels of directories as source directories in a mounted WebDAV
>>> directoy between '/' and '/apps/helloworld'
>>>
>>> Does somebody have an idea how to attach the source correctly?
>>>
>>> Best,
>>>
>>> Sandro
>>
>>
>


Re: Scala debugger

Posted by Sandro Boehme <sa...@gmx.de>.
Michael,

I debugged the debugger (JavaDebugUtils.java:128) and for me it looks 
like the debugger is looking for a file named 
"helloworld/helloworld.html" when I set a breakpoint at "html.scala".

Are you sure it is possible to attach a scala script source to the debugger?

Best,

Sandro

Am 07.12.10 17:16, schrieb Michael Dürig:
>
> Sandro,
>
> Getting the sources attached is a bit tricky. The actual script sources
> are in the resource folder (since they are resources bundled into
> Sling). So if you want to step through the script source it should be
> possible by telling Eclipse to look into the appropriate folder under
> main/resources. In the case of the hello word module that would be
> hello-world/src/main/resources/content/apps
>
> Michael
>
>
> On 2.12.10 15:39, Sandro Boehme wrote:
>> Hello,
>>
>> reading http://www.scala-lang.org/node/5257 I assume I can use the
>> debugger for the Scala scripts in Sling. I can indeed attach to the
>> debugger, set a breakpoint and the debugger will start at the specified
>> position. What I can not get to work is: attaching the source correctly.
>> I tried it with the hello world project and used:
>> o The source directory from the generated Eclipse project
>> o All levels of directories as source directories in a mounted WebDAV
>> directoy between '/' and '/apps/helloworld'
>>
>> Does somebody have an idea how to attach the source correctly?
>>
>> Best,
>>
>> Sandro
>
>


Re: Scala debugger

Posted by Sandro Boehme <sa...@gmx.de>.
Hi Michael,

thanks for your feedback.
Judging from the package name this was my first try. I guess it's an 
other problem then. But its good to know that it should work as expected.

Best,

Sandro

Am 07.12.10 17:16, schrieb Michael Dürig:
>
> Sandro,
>
> Getting the sources attached is a bit tricky. The actual script sources
> are in the resource folder (since they are resources bundled into
> Sling). So if you want to step through the script source it should be
> possible by telling Eclipse to look into the appropriate folder under
> main/resources. In the case of the hello word module that would be
> hello-world/src/main/resources/content/apps
>
> Michael
>
>
> On 2.12.10 15:39, Sandro Boehme wrote:
>> Hello,
>>
>> reading http://www.scala-lang.org/node/5257 I assume I can use the
>> debugger for the Scala scripts in Sling. I can indeed attach to the
>> debugger, set a breakpoint and the debugger will start at the specified
>> position. What I can not get to work is: attaching the source correctly.
>> I tried it with the hello world project and used:
>> o The source directory from the generated Eclipse project
>> o All levels of directories as source directories in a mounted WebDAV
>> directoy between '/' and '/apps/helloworld'
>>
>> Does somebody have an idea how to attach the source correctly?
>>
>> Best,
>>
>> Sandro
>
>


Re: Scala debugger

Posted by Michael Dürig <md...@apache.org>.
Sandro,

Getting the sources attached is a bit tricky. The actual script sources
are in the resource folder (since they are resources bundled into
Sling). So if you want to step through the script source it should be
possible by telling Eclipse to look into the appropriate folder under
main/resources. In the case of the hello word module that would be
hello-world/src/main/resources/content/apps

Michael


On 2.12.10 15:39, Sandro Boehme wrote:
> Hello,
>
> reading http://www.scala-lang.org/node/5257 I assume I can use the
> debugger for the Scala scripts in Sling. I can indeed attach to the
> debugger, set a breakpoint and the debugger will start at the specified
> position. What I can not get to work is: attaching the source correctly.
> I tried it with the hello world project and used:
> o The source directory from the generated Eclipse project
> o All levels of directories as source directories in a mounted WebDAV
> directoy between '/' and '/apps/helloworld'
>
> Does somebody have an idea how to attach the source correctly?
>
> Best,
>
> Sandro


Re: Scala debugger

Posted by Michael Dürig <md...@adobe.com>.
Sandro,

Getting the sources attached is a bit tricky. The actual script sources 
are in the resource folder (since they are resources bundled into 
Sling). So if you want to step through the script source it should be 
possible by telling Eclipse to look into the appropriate folder under 
main/resources. In the case of the hello word module that would be 
hello-world/src/main/resources/content/apps

Michael


On 2.12.10 15:39, Sandro Boehme wrote:
> Hello,
>
> reading http://www.scala-lang.org/node/5257 I assume I can use the
> debugger for the Scala scripts in Sling. I can indeed attach to the
> debugger, set a breakpoint and the debugger will start at the specified
> position. What I can not get to work is: attaching the source correctly.
> I tried it with the hello world project and used:
> o The source directory from the generated Eclipse project
> o All levels of directories as source directories in a mounted WebDAV
> directoy between '/' and '/apps/helloworld'
>
> Does somebody have an idea how to attach the source correctly?
>
> Best,
>
> Sandro