On Mon, Jun 17, 2013 at 01:28:03AM +0530, Rajath Shashidhara wrote:
> Hello Ariel,
> 
> I'm debugging with the help of Log Statements.
> Is there any other way?

The proper way is setting break points in the source, watching
variables, etc.

How are you deploying your extension? How are you debugging it?

The task is: inside the same IDE, you have to debug your component once
the extension is installed; and you have to test it with a client
application that you also have to debug.

Right-click on the project root inside NetBeans, the context menu has
some AOO specific options:

a) Debug Extension in target AOO
b) Deploy and Run Extension in AOO

(a) will create a user profile inside the build folder
(build/soffice_debug) that will be removed every time you clean the
project. The extension will be installed for this user profile only.

This has some advantages and some drawbacks, one is that the client
application to test the extension cannot use the simple bootstrap
mechanism because it is likely to boostrap an office with your default
user profile, not this profile inside the build directory of your NB
project.

One possible solution to debug both the extension and the client
application:

- configure the JVM used by AOO to listen for debugger connections, see
  
http://wiki.openoffice.org/wiki/Scripting_in_Java_with_NetBeans_IDE#Java_configuration_in_OpenOffice.org_Options_dialog
  (do not use port 8000 as in the example, choose other number like
  9009)
- deploy the extension in your default user profile
- attach the debugger: inside NetBeans, menu Debug - Attach Debugger (see
  http://wiki.openoffice.org/wiki/File:023_attach_debugger_config.png
  but change the port to the one you chose in the step above)
- set break points in the extension/component sources
- set break points in the client application
- Debug the client application Ctr + F5 with the project select

With this steps you should be able to debug the client application and
the UNO component together, while the first uses the second.

Draw back: every time you change your component's sources you should
deploy the extension (and restart the office).


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Attachment: pgp8qOSiCGO7E.pgp
Description: PGP signature

Reply via email to