0

I want to add the following compiler attributes to an Eclipse plugin I developed for Lotus Notes, so that when an exception occurs, I get the line where it occurred:

debug=true debuglevel=lines,vars,source

I've thought this is the best way to do this, after seeing this question

So I've put in the build.properties file this new line

compilerArg ="-debug=true -debuglevel=lines,vars,source "

It doesn't show the lines where exceptions occur (still shows "Unknown Source")

Any thoughts are appreciated.

EDIT: I am using Eclipse to run the build, from the update site project.

Community
  • 1
  • 1
Vlad Ilie
  • 1,389
  • 1
  • 13
  • 37

3 Answers3

1

Eclipse uses the Eclipse 'ecj' compiler not 'javac' so you need to specify arguments that 'ecj' understands (see here). So -g or -g:lines,vars,source sets all debug information.

greg-449
  • 109,219
  • 232
  • 102
  • 145
  • I've had no luck compiling and building like that, surely I'm doing something wrong – Vlad Ilie Dec 07 '15 at 16:47
  • You need to tell us which tools you are using to do the build. Lines numbers are normally on by default. – greg-449 Dec 07 '15 at 17:57
  • these args are for an offline pde-build and belong inside build.properties of the build. They will not work inside the plugins build.properties. – Peter Kirschner Dec 08 '15 at 10:34
  • @greg-449 I am using Eclipse's Build command. I was expecting that they would be taken into consideration in that case. Check edited question. Thanks again – Vlad Ilie Jan 12 '16 at 12:18
  • @PeterKirschner where do I find the appropriate build.properties file to place these arguments in? – Vlad Ilie Feb 02 '16 at 14:48
  • Thanks again, guys! It seems it was the environment's fault, deliberately not showing line numbers. – Vlad Ilie Feb 03 '16 at 15:30
1

The template for a headless pde build is found inside each eclipse-sdk at

<eclipse-sdk>\plugins\org.eclipse.pde.build_<version>\templates\headless-build\build.properties

If you follow the description for an PDE product build you should use the template from above inside <buildConfigurations>/build.properties. Similar thing is described here for PDE feature builds.

Peter Kirschner
  • 927
  • 1
  • 9
  • 17
  • thanks for your answer, it seems though the environment I was publishing the plugin in was deliberately hiding the lines, for performance improvement – Vlad Ilie Feb 03 '16 at 15:28
0

Ugh, it seems Lotus Notes hides line numbers by default, despite them being present in the classes:

http://lekkimworld.com/2010/04/14/java_class_line_numbers_for_plugin_developers.html

Line numbers are removed from the classes added to the shared class cache to reduce the memory needed for the memory mapped classes. To re-enable the line numbers, one needs to edit the \framework\rcp\deploy\jvm.properties file and add comment out the ignorelinenumbers vm argument.

Vlad Ilie
  • 1,389
  • 1
  • 13
  • 37