New way to enable the experimental Scala debugger

125 views
Skip to first unread message

Luc Bourlier

unread,
Jul 25, 2012, 8:41:02 AM7/25/12
to scala-i...@googlegroups.com, scala-...@googlegroups.com
Hi everybody,

This is a heads-up on a small behavior change.

I just merge a set of changes for the experimental Scala debugger. There are no feature changes, but a more cleaner code that doesn't depend on the JDT debugger anymore.

The visible modification is the way the Scala debugger is enabled. It used to be a checkbox in the Scala/Debug preference page, and was apply to any Java debug session.
It now uses the support provided by Eclipse to select which launcher/debugger to use. It allows to select the launcher workspace wide for a launch configuration type, or for each launch configuration.
It is also more 'in-your-face'. It doesn't allow you to start a launch configuration until a launcher has been selected, and Eclipse doesn't set any default. So the quick fix is to select your default in the preferences.

A bit more details and pretty pictures are available in the updated doc[2].

This also means that the Scala debugger is only available to some launch configuration. Right now only the 'Scala Application' ones. I am creating a pull request for the Equinox Weaving launch configurations, and a ticket has been created for the 'Remote Java Application' one.

The change will be part of the next nightly.

Luc


--
Luc Bourlier - Scala IDE contributor
TypeSafe - The software stack for applications that scale

Eugene Burmako

unread,
Jul 25, 2012, 8:43:06 AM7/25/12
to scala-...@googlegroups.com, scala-i...@googlegroups.com
Hey! What about performance?

Luc Bourlier

unread,
Jul 26, 2012, 10:18:34 AM7/26/12
to scala-i...@googlegroups.com, scala-...@googlegroups.com
The changes for the Equinox Weaving launch configurations as been merged in.

It requires latest version of the org.scala-ide.equinox-weaving-launcher plugin.
So people who want to use the Scala debugger with the Equinox weaving launchers need to force the update of the plugin, as Eclipse will not  indicate any problem when updating to the next Scala IDE nightly (some strange behavior due to the fact that the dependency is optional).

Luc

Luc Bourlier

unread,
Jul 26, 2012, 10:22:10 AM7/26/12
to scala-i...@googlegroups.com, scala-...@googlegroups.com
Now that the code is clean, I will be able to work on improving the features. I know some obvious performance bottleneck, I just need the time to work on it.

Luc


On Wednesday, July 25, 2012 2:43:06 PM UTC+2, Eugene Burmako wrote:
Hey! What about performance?

Rafał Krzewski

unread,
Jul 28, 2012, 10:30:48 AM7/28/12
to scala-...@googlegroups.com, scala-i...@googlegroups.com
I'm wondering ... does that mean that Scala Debugger features will not be available for other launchers like JUnit, ScalaTest, WTP server or more exotic ones like Bndtools OSGi framework (http://bndtools.org/) or Webby (https://github.com/sonatype/m2eclipse-webby)
If this is the case, and each project that contributes a launcher would have to be patched to provide Scala debugger integration, it would be quite a big problem IMO.
Hopefully I'm missing something about how Eclipse launchers work :)

Regards,
Rafał

iulian dragos

unread,
Dec 22, 2012, 9:40:44 AM12/22/12
to scala-i...@googlegroups.com, scala-...@googlegroups.com
Hi,

I have never used the JBoss launcher, so I don't know if this answers your question, but launch configurations (like JUnit or Eclipse Equinox) *can* use different launchers. It may be that you can still use the Scala debugger. Screenshots are worth 1000 words, here's the docs:


cheers,
iulian

On Sat, Dec 22, 2012 at 3:45 PM, Julio Faerman <jfae...@gmail.com> wrote:
I am trying to debug a scala application running on JBoss AS7, i guess i cannot see the variables and other debugger features as i am using another launcher, as mentioned before.

Any way around this?

Thanks,
Julio



--
« Je déteste la montagne, ça cache le paysage »
Alphonse Allais

Luc Bourlier

unread,
Mar 26, 2013, 10:40:09 AM3/26/13
to scala-i...@googlegroups.com, scala-...@googlegroups.com
Robby,

you are right, it is usually not possible to enable the Scala debugger for other launch configurations without adding a bit of code.
It is usually a matter of launching the Scala debugger instead of Java one [1] [2]. But it is a case-by-case problem.

I created a ticket to keep track of the feature: https://scala-ide-portfolio.assembla.com/spaces/scala-ide/tickets/1001635

Luc

[2] https://github.com/scala-ide/scala-ide/blob/master/org.scala-ide.sdt.debug/src/scala/tools/eclipse/launching/ScalaEclipseApplicationLaunchConfigurationDelegate.scala

Le lundi 25 mars 2013 17:38:10 UTC+1, Dr. Robby a écrit :
Now that Scala IDE 3.0 is out. Is there a brief instruction on how to use the new Scala debugger for other launch configurations (e.g., JUnit or ScalaTest)?
The Eclipse Default Launchers preference pane only displays launchers that can apply for multiple configurations (e.g., it does not display JUnit or ScalaTest launch configurations). It looks like that this cannot be done without providing launch delegate configurations in a plugin.xml file similar to https://github.com/scala-ide/scala-ide/blob/master/org.scala-ide.sdt.debug/plugin.xml#L26 (?).


Robby
Reply all
Reply to author
Forward
0 new messages