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

ensime+debugger: how to launch the debuggee with my "-D" properties?

1 reply
OP
Joined: 2011-02-08,
User offline. Last seen 1 year 17 weeks ago.
Hi again, ensime users.. would you please suggest a way to get this to work?

I would like to pass the app I am debugging some custom-properties on the command-line using the "-D" jvm-arg format

Ensime's debugger is already great at prompting for *application* args; is there a way to
a. get it to prompt for jvm-args? Or
b. set some appropriate key(s) in the ".ensime" file?

the ensime manual refers to ENSIME_JVM_ARGS in the server start-script; is that a viable option?

 -- OP


Aemon Cannon
Joined: 2010-03-21,
User offline. Last seen 1 year 24 weeks ago.
Re: ensime+debugger: how to launch the debuggee with my "-D" pr
Hey OP,
ENSIME_JVM_ARGS are the args ENSIME's jvm -- you don't need to change those.
There's not really a great way to pass jvm args right now.. but here's a workaround:
ENSIME uses jdb. From the jdb manual:
-Joption
Pass option to the Java virtual machine, where option is one of the options described on the reference page for the java application launcher. For example, -J-Xms48m sets the startup memory to 48 megabytes.

So all you need to do is modify the command that ENSIME uses to start jdb. This command is stored as a list of strings and keywords in ensime-db-cmd-template defined in ensime-debug.el. You could change as follows:
(setq ensime-db-cmd-template  '("jdb" "-JYOUR_OPTION" "YOUR_VALUE" "-classpath" :classpath     "-sourcepath" :sourcepath :debug-class :debug-args))
Hope that helps.

On Fri, Apr 8, 2011 at 6:43 AM, OP <ovr [dot] pron8r [at] gmail [dot] com> wrote:
Hi again, ensime users.. would you please suggest a way to get this to work?

I would like to pass the app I am debugging some custom-properties on the command-line using the "-D" jvm-arg format

Ensime's debugger is already great at prompting for *application* args; is there a way to
a. get it to prompt for jvm-args? Or
b. set some appropriate key(s) in the ".ensime" file?

the ensime manual refers to ENSIME_JVM_ARGS in the server start-script; is that a viable option?

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