Debugging

Pipeline Debugging

Pause SFCC pipelines on nodes, step through them and read the Pipeline Dictionary in the same debug session as your scripts

Legacy storefronts still run pipelines, and a pipeline is hard to follow from its XML alone. Intellij SFCC pauses a running pipeline on a node, opens the Pipeline Editor at that node and lists everything the pipeline has collected so far in the Pipeline Dictionary

Pipeline breakpoints sit on nodes in the pipeline editor. When a request reaches one, the editor marks the current node, the Pipeline stack shows the pipeline and node, and Pipeline Dictionary lists what the pipeline has collected so far

How it works

Pipeline debugging runs inside the same Salesforce B2C Commerce (SFCC) debug session as the Script Debugger. Every session starts both: script breakpoints stop JavaScript and DemandwareScript, pipeline breakpoints stop pipeline nodes. A Script node can hand over to the script debugger, so a breakpoint in its .ds file stops there too

With a site scope selected, the session tells the instance which site you are debugging. With Global scope no site is sent

Set a breakpoint

Open the pipeline

Open the pipeline XML, for example app_storefront_controllers/cartridge/pipelines/Cart.xml. It opens in the Pipeline Editor

Mark a node

Select a node and click Breakpoint in the editor toolbar. You can also click the gutter of the XML source on a line that belongs to a node. The breakpoint shows up as SFCC Pipeline in Run › View Breakpoints

Start the session

Start the Salesforce B2C Commerce (SFCC) configuration with Debug, see Start a session

Run the pipeline

Open the storefront URL that runs it, for example https://<host>/on/demandware.store/Sites-SiteGenesis-Site/default/Cart-Show. The start node buttons of the Pipeline Editor open or copy that URL for you

When the request reaches the node, the console prints "Pipeline breakpoint hit." and the editor shows the paused node

While paused

ControlWhat it does
Step Over, Step Into, Step OutMove through the pipeline node by node, the way the instance's pipeline debugger steps
ResumeRuns to the next pipeline or script breakpoint
Run to CursorPut the cursor on a node's line in the XML and the pipeline runs to that node

After a step the console prints "Pipeline step paused."

The Frames list shows a Pipeline stack. Each frame reads as the pipeline name followed by the node ID

Pipeline Dictionary

The variables view opens with Pipeline Dictionary expanded. It holds the keys the pipeline has set so far, such as objects from pipelets and the outputs of script nodes. Expand objects to see their members, and use Evaluate Expression to check a value or a decision condition

When the pipeline stopped on an error, the dictionary starts with an Exception entry that names the exception type and message

Every frame of the stack shows the same dictionary, the one of the node where the pipeline is paused. To see values from an earlier node, set a breakpoint there and run the request again

Troubleshooting

SymptomWhat to do
The session stops with "Debugger failed to initialize pipeline state before launch."The pipeline debugger couldn't reach the instance. Check the connection, then start the session again
A pipeline breakpoint is never hitUpload the pipeline, check that the request runs that pipeline and node, and select the site in the site scope widget
You can't set a breakpoint on an XML lineThe line doesn't belong to a node. Use the node's own line, or set it in the graph
Dictionary values look the same in every frameThat is expected, see Pipeline Dictionary
A script node doesn't stopSet a script breakpoint in its .ds or .js file. Pipeline breakpoints stop on nodes, not inside scripts

On this page