>
> But with Jenkins build output console, it does not show the line number 
> where the exception has occurred.
>
> In this case, based on method name ie `trim()` from log, I check wherever 
> `trim()` method is used. But as I've used it at multiple places in same 
> method, it becomes difficult to identify exactly where error has occurred.
>
> Another way is to add echo statements and re-run build and see where it 
> gives this exception but this is time consuming.
>
> Is there any better way/plugin using which I can identify at which line of 
> pipeline code exception has occurred?
>

You can try some of these methods:

i. In the humongous stack trace, search for workflow script with the line 
number, like, for example, 'workflow script: 70'.

Pls excuse for the shameful drum beating.

ii. https://dzone.com/articles/10-tips-to-debug-jenkins-pipelines

iii. 
https://dzone.com/articles/tips-to-debug-jenkins-v2x-pipeline-scripts-part-2

/Ram

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/48ba7f7f-313e-475b-8f41-9daf67888e12o%40googlegroups.com.

Reply via email to