In a development environment for message flows, a user defined flow may be
processed into a more efficient optimized flow. However, debugging
execution of the optimized flow may be confusing to the user where a
correspondence between connections in the optimized flow and connections
in the user defined flow are not direct. To mitigate this confusion, a
connections mapping table is generated along with the optimized flow. The
deploy document received by the runtime may include enough information to
recreate the connections mapping table such that during debugging of the
optimized flow, the user may follow the user defined flow. The use of a
stack at the runtime allows a debugger to maintain awareness of previous
pauses in execution caused by the placement of breakpoints on connections
in the user defined flow while directing the runtime through execution of
the optimized flow.