How to run the JaCoCo program in debug mode to determine how it actually works?

44 views
Skip to first unread message

Shehan Dhaleesha

unread,
Sep 12, 2019, 11:57:08 PM9/12/19
to JaCoCo and EclEmma Users
So what I actually want to run the JaCoCo agent or the whole program in debug mode so that I can see what are the steps that going through the agent. How should I start? There are plenty of project files inside the JaCoCo repository. Which one is the right one finmy case? 

Marc Hoffmann

unread,
Sep 13, 2019, 2:21:03 AM9/13/19
to JaCoCo and EclEmma Users
Hi,

I don’t think is is possible to debug the JaCoCo agent easily from the source code projects, the class files get re-packaged during the build to create jacocoagent.jar

You might start with CoreTutorial from our examples: https://www.jacoco.org/jacoco/trunk/doc/api.html

It can be directly launched in the IDE. But keep in mind that JaCoCo does byte code transformation with the classes under test. So you can’t see any source code of the probes inserted to the test target.

Regards,
-marc

On 13. Sep 2019, at 05:57, Shehan Dhaleesha <sonodew...@gmail.com> wrote:

So what I actually want to run the JaCoCo agent or the whole program in debug mode so that I can see what are the steps that going through the agent. How should I start? There are plenty of project files inside the JaCoCo repository. Which one is the right one finmy case? 

--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/cc206b6e-5809-4a6f-a502-c961f7372533%40googlegroups.com.

Shehan Dhaleesha

unread,
Sep 13, 2019, 5:57:01 AM9/13/19
to JaCoCo and EclEmma Users
So what should be the project name that I should debug using the IDE(let's say Intellij)? Is it org.jacoco.agent.rt or org.jacoco.agent or jacoco or org.jacoco.core or just debug the whole repo?


On Friday, 13 September 2019 11:51:03 UTC+5:30, Marc R. Hoffmann wrote:
Hi,

I don’t think is is possible to debug the JaCoCo agent easily from the source code projects, the class files get re-packaged during the build to create jacocoagent.jar

You might start with CoreTutorial from our examples: https://www.jacoco.org/jacoco/trunk/doc/api.html

It can be directly launched in the IDE. But keep in mind that JaCoCo does byte code transformation with the classes under test. So you can’t see any source code of the probes inserted to the test target.

Regards,
-marc

On 13. Sep 2019, at 05:57, Shehan Dhaleesha <sonodew...@gmail.com> wrote:

So what I actually want to run the JaCoCo agent or the whole program in debug mode so that I can see what are the steps that going through the agent. How should I start? There are plenty of project files inside the JaCoCo repository. Which one is the right one finmy case? 

--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jac...@googlegroups.com.

Marc Hoffmann

unread,
Sep 17, 2019, 4:10:56 PM9/17/19
to JaCoCo and EclEmma Users
CoreTutorial is in project org.jacoco.examples


To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/10247346-bc62-4678-9435-1f53bbed29e7%40googlegroups.com.

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages