Stepping/Debugging into the arguments capturing code in IDE?

16 views
Skip to first unread message

Yifan Zhang

unread,
Sep 30, 2021, 3:49:32 AM9/30/21
to PowerMock
Hello, 

Currently in my project, I'm using the following lines to capture the arguments from a static void method: 

ArgumentCaptor<String> firstArgument = ArgumentCaptor.forClass(String.class);
ArgumentCaptor<Object> secondArgument = ArgumentCaptor.forClass(Object.class);
myMethod(firstArgument.capture(), secondArgument.capture());

I'd like to see what happens behind the bolded line of code through a debugging session, but when I try to debug it with IntelliJ IDEA, the debugger just goes into the normal definition of the method (apparently the original implementation of the method wouldn't allow the current usage). 

Is there a way for me to debug into the real implementation with PowerMockito with an IDE? Namely for the debugger to step into the code where PowerMockito interacts with the method and make it allow the above behavior? 

Thanks in advance. :) 

Yifan 


Reply all
Reply to author
Forward
0 new messages