This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Setting breakpoints inside partial functions and other stuff

8 replies
David Pollak
Joined: 2008-12-16,
User offline. Last seen 42 years 45 weeks ago.
Folks,

I did some debugging yesterday with NetBeans and IntelliJ.  I was unable to set breakpoints inside partial functions.  I couldn't set breakpoints in for comprehensions and stepping through for comprehensions was not intuitive (I understand that they're sugar for map/flatMap, but I expected "step" to work at the language syntax level).

So, am I missing a compiler setting or something that would make one or both of these use cases work as expected?  Does Eclipse have a better strategy for this?

Thanks,

David

--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp
Randall R Schulz
Joined: 2008-12-16,
User offline. Last seen 1 year 29 weeks ago.
Re: Setting breakpoints inside partial functions and other stuf

On Friday May 22 2009, David Pollak wrote:
> Folks,
>
> I did some debugging yesterday with NetBeans and IntelliJ. I was
> unable to set breakpoints inside partial functions. I couldn't set
> breakpoints in for comprehensions and stepping through for
> comprehensions was not intuitive (I understand that they're sugar for
> map/flatMap, but I expected "step" to work at the language syntax
> level).
>
> So, am I missing a compiler setting or something that would make one
> or both of these use cases work as expected? Does Eclipse have a
> better strategy for this?

I know only IDEA, but JetBrains has acknowledged debugger shortcomings
in the Scala plug-in and says they'll be fixed. I think Scala is a
challenge for them (either due to the language complexity vis. a vis.
Java or due to the magnitude of the resource allocation they've made to
support it or both), but things are moving along, just not as fast as
Scala-programming IDEA users might like.

> Thanks,
>
> David

Randall Schulz

Caoyuan
Joined: 2009-01-18,
User offline. Last seen 42 years 45 weeks ago.
Re: Setting breakpoints inside partial functions and other stu

Hi David,

I fixed this issue (on NetBeans) several weeks ago, but only available
for NetBeans' nightly build, I'll release a new version around early
June.

-Caoyuan

On Sat, May 23, 2009 at 12:32 AM, David Pollak
wrote:
> Folks,
>
> I did some debugging yesterday with NetBeans and IntelliJ.  I was unable to
> set breakpoints inside partial functions.  I couldn't set breakpoints in for
> comprehensions and stepping through for comprehensions was not intuitive (I
> understand that they're sugar for map/flatMap, but I expected "step" to work
> at the language syntax level).
>
> So, am I missing a compiler setting or something that would make one or both
> of these use cases work as expected?  Does Eclipse have a better strategy
> for this?
>
> Thanks,
>
> David
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Git some: http://github.com/dpp
>

milessabin
Joined: 2008-08-11,
User offline. Last seen 33 weeks 3 days ago.
Re: Setting breakpoints inside partial functions and other stu

On Fri, May 22, 2009 at 6:32 PM, David Pollak
wrote:
> Does Eclipse have a better strategy for this?

The Scala IDE for Eclipse does support setting breakpoints in
(partial) functions. I suspect that stepping through
for-comprehensions will still seem a little counter-intuitive, but
running from breakpoint to breakpoint should be fairly comprehensible.

Cheers,

Miles

David Pollak
Joined: 2008-12-16,
User offline. Last seen 42 years 45 weeks ago.
Re: Setting breakpoints inside partial functions and other stu


On Fri, May 22, 2009 at 9:48 AM, Caoyuan <dcaoyuan@gmail.com> wrote:
Hi David,

I fixed this issue (on NetBeans) several weeks ago, but only available
for NetBeans' nightly build, I'll release a new version around early
June.

I can't wait.
 


-Caoyuan

On Sat, May 23, 2009 at 12:32 AM, David Pollak
<feeder.of.the.bears@gmail.com> wrote:
> Folks,
>
> I did some debugging yesterday with NetBeans and IntelliJ.  I was unable to
> set breakpoints inside partial functions.  I couldn't set breakpoints in for
> comprehensions and stepping through for comprehensions was not intuitive (I
> understand that they're sugar for map/flatMap, but I expected "step" to work
> at the language syntax level).
>
> So, am I missing a compiler setting or something that would make one or both
> of these use cases work as expected?  Does Eclipse have a better strategy
> for this?
>
> Thanks,
>
> David
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Git some: http://github.com/dpp
>



--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp
David Pollak
Joined: 2008-12-16,
User offline. Last seen 42 years 45 weeks ago.
Re: Setting breakpoints inside partial functions and other stu


On Fri, May 22, 2009 at 9:55 AM, Miles Sabin <miles@milessabin.com> wrote:
On Fri, May 22, 2009 at 6:32 PM, David Pollak
<feeder.of.the.bears@gmail.com> wrote:
> Does Eclipse have a better strategy for this?

The Scala IDE for Eclipse does support setting breakpoints in
(partial) functions. I suspect that stepping through
for-comprehensions will still seem a little counter-intuitive, but
running from breakpoint to breakpoint should be fairly comprehensible.

Miles,

Sorry for not trying Eclipse.  I will do so today.

Thanks!

David
 

Cheers,


Miles

--
Miles Sabin
tel: +44 (0)7813 944 528
skype:  milessabin
http://twitter.com/milessabin



--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp
Mario Camou
Joined: 2009-04-27,
User offline. Last seen 42 years 45 weeks ago.
Re: Setting breakpoints inside partial functions and other stu

JavaOne-ish perhaps?

On May 22, 2009 6:48 PM, "Caoyuan" <dcaoyuan@gmail.com> wrote:

Hi David,

I fixed this issue (on NetBeans) several weeks ago, but only available
for NetBeans' nightly build, I'll release a new version around early
June.

-Caoyuan

On Sat, May 23, 2009 at 12:32 AM, David Pollak <feeder.of.the.bears@gmail.com> wrote: > Folks, > > ...

Caoyuan
Joined: 2009-01-18,
User offline. Last seen 42 years 45 weeks ago.
Re: Setting breakpoints inside partial functions and other stu

On Sat, May 23, 2009 at 2:08 AM, Mario Camou wrote:
> JavaOne-ish perhaps?

Wait for NetBeans 6.7 official release.

>
> On May 22, 2009 6:48 PM, "Caoyuan" wrote:
>
> Hi David,
>
> I fixed this issue (on NetBeans) several weeks ago, but only available
> for NetBeans' nightly build, I'll release a new version around early
> June.
>
> -Caoyuan
>
> On Sat, May 23, 2009 at 12:32 AM, David Pollak
> wrote: > Folks, > > ...

Randall R Schulz
Joined: 2008-12-16,
User offline. Last seen 1 year 29 weeks ago.
Re: Setting breakpoints inside partial functions and other stuf

On Friday May 22 2009, Randall R Schulz wrote:
> On Friday May 22 2009, David Pollak wrote:
> > Folks,
> >
> > I did some debugging yesterday with NetBeans and IntelliJ. I was
> > unable to set breakpoints inside partial functions. I couldn't set
> > breakpoints in for comprehensions and stepping through for
> > comprehensions was not intuitive (I understand that they're sugar
> > for map/flatMap, but I expected "step" to work at the language
> > syntax level).
> >
> > So, am I missing a compiler setting or something that would make
> > one or both of these use cases work as expected? Does Eclipse have
> > a better strategy for this?
>
> I know only IDEA, but JetBrains has acknowledged debugger
> shortcomings in the Scala plug-in and says they'll be fixed. I think
> Scala is a challenge for them (either due to the language complexity
> vis. a vis. Java or due to the magnitude of the resource allocation
> they've made to support it or both), but things are moving along,
> just not as fast as Scala-programming IDEA users might like.

Incidentally, a new release of the Scala plug-in came out today.

RRS

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland