Hi to all,
When I set breakpoints on activities on design surface, they don't get hit (and display circle with exclamation mark during debugging session). However breakpoints in code behind of workflow break just fine.
Thanks in advance.
Hi to all,
When I set breakpoints on activities on design surface, they don't get hit (and display circle with exclamation mark during debugging session). However breakpoints in code behind of workflow break just fine.
Thanks in advance.
Beta2 - Breakpoints in designer
Forbes.Pu
hi there,
I just tried the above method to step through the workflow(which is a State m/c) but then the workflow host(Windows app in my case) Properties\Debug\Start ask for the workflow to be available in as a executable,but I will need it to remain as a class library as I create workflow instances using late binding(using reflection on this class library).
I might be missing something here.......
kindly let me know How would I still be able to achieve this
Thanks...
meArun
Hi,
I tried this scenario on the latest version of the WF (not yet released to the users) but could not reproduce the null reference exception. Please try this scenario with the next released version and let us know if you still get the exception.
-Sonali
Kevin Lawrence
Hi,
You need to set the workflow library as the start up project and Properties\Debug\"Start external program:" of the workflow library should contain the path for the windows app. These are the only things you need to do to debug a workflow library. If you have problems after following these steps, please give me some more information about your scenario and the exact steps you are following.
Thanks,
Sonali
geebee
hi,
Well I did follow the steps as you mentioned,but when I create a new Workflow instance
I get the an exception when my Workflow host(Windows application)
uses the following lines of code to create an workflow instance.
Code:
private void Startworkflow()
{
//...............Workflow related operations.......................//
workflowRuntime.GetService<FileTrackingService.FileTrackingService>().TrackingPath(Application.StartupPath + "//" + txtSRNumber.Text);
System.Reflection.Assembly assembly = Assembly.Load("Workflow");
Type type = assembly.GetType("TestSM");
guid = System.Guid.NewGuid();
if (type != null & guid != null && (namedArguments.Count > 0))
{
WorkflowInstance instance = workflowRuntime.CreateWorkflow(type, namedArguments, guid);//the exception is raised here
instance.Start();
}
}
Exception:
An unhandled exception of type 'System.NullReferenceException' occurred in System.Workflow.Runtime.dll
Additional information: Object reference not set to an instance of an object.
Thanks in advance..
rkin005
Hi Odul,
This can happen if workflow debugger is not invoked. If workflow is a library and workflow host is a different application, you will need to mark the workflow library as the startup project and set path of the workflow host in Properties\Debug\Start external Program. This is required to invoke the custom workflow debug engine using F5 command.
-Sonali