Score:0

Debugging Jenkins pipelines and shared library

ag flag
ssb

We are using both scripted and declarative pipelines. In CI flow we are using Jenkinsfile and in some other flows we are using Jenkins GUI pipelines which triggers different functionality from shared library. Our shared library is divided to vars and Src where all our classed are located and vars where we have common pipelines steps we use.

We are interested in finding a way that will allow us to set breakpoints and debug Jenkins pipelines and shared library including src classes and vars flows.

I need a dedicated solution, not using a unit test.

jp flag
This question was already asked on Stack Overflow: https://stackoverflow.com/questions/47993538/debugging-groovy-scripted-pipelines-in-jenkins This discussion may also be useful to you: https://groups.google.com/g/jenkinsci-users/c/1eqGI902ins/m/t68I5WwtAgAJ In my experience, print statement debugging is about as good as it gets. There's no debugger available that allows you to set breakpoints or inspect variables or drop in to a REPL in a Pipeline environment or anything like that.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.