How to debug a XOML-Only Workflow?
- Hi,
is it possible to debug a dynamically loaded workflow (XOML-Only)?
Did somebody done it?
Thanks
Answers
Yes, it is possible to debug a xoml-only workflow. You will need to set breakpoint in the VS using breakpoints window.
1.Open Breakpoints window
2. Add New breakpoint and set function name equal to Id of the activity on which you want to break. VS will resolve these breakpoints after the workflow starts executing. Alternatively you can set breakpoint using the syntax QualifiedActivityId[:[Fully qualified ClassName][:InstanceId]]
3. Ensure to set Language = Workflow in the breakpoints dialogDo an F5 if you have the project, which starts the workflow, open or attach the debugger to the host which is executing the workflow by selecting "Workflow" debug engine in the Attach to process dialog.
After the activity starts executing, VS will open a live-xoml window which will display the workflow and you will be able to debug it
Examples of the breakpoints are
codeActivity1:Client.Workflow1
delayActivity1:Client.Workflow1:{7482ed62-5ca0-410c-bf36-04a6817f19BD}
CustAct1.S1:Client.Workflow1Visual debugging of dynamically loaded xoml or workflows dynamically modified during execution is not supported in this release. You should however be able to place breakpoints in the code for custom activities used in the workflow definition and be able to step through and debug it.
All Replies
Yes, it is possible to debug a xoml-only workflow. You will need to set breakpoint in the VS using breakpoints window.
1.Open Breakpoints window
2. Add New breakpoint and set function name equal to Id of the activity on which you want to break. VS will resolve these breakpoints after the workflow starts executing. Alternatively you can set breakpoint using the syntax QualifiedActivityId[:[Fully qualified ClassName][:InstanceId]]
3. Ensure to set Language = Workflow in the breakpoints dialogDo an F5 if you have the project, which starts the workflow, open or attach the debugger to the host which is executing the workflow by selecting "Workflow" debug engine in the Attach to process dialog.
After the activity starts executing, VS will open a live-xoml window which will display the workflow and you will be able to debug it
Examples of the breakpoints are
codeActivity1:Client.Workflow1
delayActivity1:Client.Workflow1:{7482ed62-5ca0-410c-bf36-04a6817f19BD}
CustAct1.S1:Client.Workflow1- Thank you SonaliC for the advice.
I tried it out and the problem I encounter is that the "wrong" .xoml window pop's up.
I think the reason might be the way I implemented the dynamic loading: I didn't used compilation for this purpose but rather I "inherited" from an empty workflow and loaded at runtime my .xoml instance (mean no x:Class property). So the loaded .xoml window is the one of the "base" workflow and not of the instance.
Does anybody know how to handle this case?
Thank you! Visual debugging of dynamically loaded xoml or workflows dynamically modified during execution is not supported in this release. You should however be able to place breakpoints in the code for custom activities used in the workflow definition and be able to step through and debug it.
- Good to know.
Thank you for the help! - I am trying the same thing. i.e. "inherited" from an empty workflow and loaded at runtime my .xoml instance (mean no x:Class property).I am not able to debug the custom activities defined inside the workflow.Have u figured out how to debug the inherited worflow in .xoml.Pls reply at sonali.noolkar@patni.com


