Re: Need help debugging Felix OSGi bundles (with Eclipse)

2015-09-12 Thread Christian Schneider

If you only need plain felix then eclipse + bndtools might help.

I just tried the new 3.0.0 version and was able to setup as small 
project in quite short time.

It features very nice debug integration.

Apart from this remote debugging always works but is less convenient.

Christian

Am 12.09.2015 um 21:31 schrieb Pedro Domingues:

Hi,

I really need to debug my code by the use of breakpoints, however this 
seems a complex undertaking with an OSGi container.


I have Eclipse and Felix (both the latest). My project is a raw OSGi 
project, I am not using PDE, just maven bundle plugin to generate the 
bundles and then copy them to the /bundle folder in felix, then I 
perform java -jar bin/felix.jar and the project runs. So no fuss here.


However I cannot debug the application that way. I've tried to read 
the docs 
(http://felix.apache.org/documentation/development/integrating-felix-with-eclipse.html) 
but they are outdated/broken and cant make them work...


How can I debug this? Will I have to avoid using OSGi just because 
debug is not supported...? :(


Thanks!

-
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org



Re: Need help debugging Felix OSGi bundles (with Eclipse)

2015-09-12 Thread development
 

sorry. I thought the was the example being given for karaf-boot. 

On 2015-09-12 16:48, developm...@mobigov.com wrote: 

> Debug with breakpoints works ok for me, I run karaf with the debug
> option and attach the same I would a tomcat app. I will say that
> somewhere I lost something because even though the ide stops at the
> correct line of the breakpoint and I can see the variables I am
> watching. The libraries included from the ide don't match with what is
> loaded because I do not get the green line and step into and over don't
> work. I also can debug with paxexam but I think OSGI is definitely much
> harder than many other technologies. I don't have a problem with this
> though. I chose java even though it is much harder to pickup than
> dynamic languages. I like type safe languages because even though there
> is more work involved in specifying the rules and it is slower to get
> started. Cleanly specifying the rules allows for better tool support and
> is priceless once a project gets large. I feel the same way about OSGI.
> It is more work upfront but once you really know what you are doing it
> saves a lot of work in the long run. It would be great if things were
> easier at no expense but that is not what drew me to karaf. Also you
> will be competing against many commercial entities for users who are
> looking for easy enterprise and distributed computing (Typesafe, Spring
> ...) so I am not sure that is the way to get more people involved. I
> think concentrating on the type of person who is willing to take the
> time to learn and configure their project so they have an optimal
> solution for the long term would probably pull in more people. 
> 
> On 2015-09-12 15:31, Pedro Domingues wrote:
> 
>> Hi, I really need to debug my code by the use of breakpoints, however this 
>> seems a complex undertaking with an OSGi container. I have Eclipse and Felix 
>> (both the latest). My project is a raw OSGi project, I am not using PDE, 
>> just maven bundle plugin to generate the bundles and then copy them to the 
>> /bundle folder in felix, then I perform java -jar bin/felix.jar and the 
>> project runs. So no fuss here. However I cannot debug the application that 
>> way. I've tried to read the docs 
>> (http://felix.apache.org/documentation/development/integrating-felix-with-eclipse.html
>>  [1] [1 [1]]) but they are outdated/broken and cant make them work... How 
>> can I debug this? Will I have to avoid using OSGi just because debug is not 
>> supported...? :( Thanks! 
>> - To 
>> unsubscribe, e-mail: users-unsubscr...@felix.apache.org For additional 
>> commands, e-mail: users-h...@felix.apache.org
> 
> Links:
> --
> [1]
> http://felix.apache.org/documentation/development/integrating-felix-with-eclipse.html
>  [1]
 

Links:
--
[1]
http://felix.apache.org/documentation/development/integrating-felix-with-eclipse.html

Re: Need help debugging Felix OSGi bundles (with Eclipse)

2015-09-12 Thread development
 

Debug with breakpoints works ok for me, I run karaf with the debug
option and attach the same I would a tomcat app. I will say that
somewhere I lost something because even though the ide stops at the
correct line of the breakpoint and I can see the variables I am
watching. The libraries included from the ide don't match with what is
loaded because I do not get the green line and step into and over don't
work. I also can debug with paxexam but I think OSGI is definitely much
harder than many other technologies. I don't have a problem with this
though. I chose java even though it is much harder to pickup than
dynamic languages. I like type safe languages because even though there
is more work involved in specifying the rules and it is slower to get
started. Cleanly specifying the rules allows for better tool support and
is priceless once a project gets large. I feel the same way about OSGI.
It is more work upfront but once you really know what you are doing it
saves a lot of work in the long run. It would be great if things were
easier at no expense but that is not what drew me to karaf. Also you
will be competing against many commercial entities for users who are
looking for easy enterprise and distributed computing (Typesafe, Spring
...) so I am not sure that is the way to get more people involved. I
think concentrating on the type of person who is willing to take the
time to learn and configure their project so they have an optimal
solution for the long term would probably pull in more people. 

On 2015-09-12 15:31, Pedro Domingues wrote: 

> Hi,
> 
> I really need to debug my code by the use of breakpoints, however this seems 
> a complex undertaking with an OSGi container.
> 
> I have Eclipse and Felix (both the latest). My project is a raw OSGi project, 
> I am not using PDE, just maven bundle plugin to generate the bundles and then 
> copy them to the /bundle folder in felix, then I perform java -jar 
> bin/felix.jar and the project runs. So no fuss here.
> 
> However I cannot debug the application that way. I've tried to read the docs 
> (http://felix.apache.org/documentation/development/integrating-felix-with-eclipse.html
>  [1]) but they are outdated/broken and cant make them work...
> 
> How can I debug this? Will I have to avoid using OSGi just because debug is 
> not supported...? :(
> 
> Thanks!
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
> For additional commands, e-mail: users-h...@felix.apache.org
 

Links:
--
[1]
http://felix.apache.org/documentation/development/integrating-felix-with-eclipse.html

Re: Need help debugging Felix OSGi bundles (with Eclipse)

2015-09-12 Thread Daniel McGreal
Hi, you should investigate "remote debug" with Eclipse which involves starting 
Java with some parameters and creating a Debug Configuration in Eclipse. 

> On 12 Sep 2015, at 20:31, Pedro Domingues  wrote:
> 
> Hi,
> 
> I really need to debug my code by the use of breakpoints, however this seems 
> a complex undertaking with an OSGi container.
> 
> I have Eclipse and Felix (both the latest). My project is a raw OSGi project, 
> I am not using PDE, just maven bundle plugin to generate the bundles and then 
> copy them to the /bundle folder in felix, then I perform java -jar 
> bin/felix.jar and the project runs. So no fuss here.
> 
> However I cannot debug the application that way. I've tried to read the docs 
> (http://felix.apache.org/documentation/development/integrating-felix-with-eclipse.html)
>  but they are outdated/broken and cant make them work...
> 
> How can I debug this? Will I have to avoid using OSGi just because debug is 
> not supported...? :(
> 
> Thanks!
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
> For additional commands, e-mail: users-h...@felix.apache.org
> 

-
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org



Re: Need help debugging Felix OSGi bundles (with Eclipse)

2015-09-12 Thread Benson Margulies
What goes wrong when you add:

-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005

to the java command line and then attach from Eclipse?


On Sat, Sep 12, 2015 at 3:31 PM, Pedro Domingues
 wrote:
> Hi,
>
> I really need to debug my code by the use of breakpoints, however this seems
> a complex undertaking with an OSGi container.
>
> I have Eclipse and Felix (both the latest). My project is a raw OSGi
> project, I am not using PDE, just maven bundle plugin to generate the
> bundles and then copy them to the /bundle folder in felix, then I perform
> java -jar bin/felix.jar and the project runs. So no fuss here.
>
> However I cannot debug the application that way. I've tried to read the docs
> (http://felix.apache.org/documentation/development/integrating-felix-with-eclipse.html)
> but they are outdated/broken and cant make them work...
>
> How can I debug this? Will I have to avoid using OSGi just because debug is
> not supported...? :(
>
> Thanks!
>
> -
> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
> For additional commands, e-mail: users-h...@felix.apache.org
>

-
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org



Need help debugging Felix OSGi bundles (with Eclipse)

2015-09-12 Thread Pedro Domingues

Hi,

I really need to debug my code by the use of breakpoints, however this 
seems a complex undertaking with an OSGi container.


I have Eclipse and Felix (both the latest). My project is a raw OSGi 
project, I am not using PDE, just maven bundle plugin to generate the 
bundles and then copy them to the /bundle folder in felix, then I 
perform java -jar bin/felix.jar and the project runs. So no fuss here.


However I cannot debug the application that way. I've tried to read the 
docs 
(http://felix.apache.org/documentation/development/integrating-felix-with-eclipse.html) 
but they are outdated/broken and cant make them work...


How can I debug this? Will I have to avoid using OSGi just because debug 
is not supported...? :(


Thanks!

-
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org