工作流服务应用程序的调试问题
由于某种原因,我在活动上设置的断点(通过设计器)在我在 VS2010 中调试的工作流服务应用程序项目中都不起作用。有一个使用工作流服务的 mvc 应用程序,我尝试将它们都设置为启动项目,并仅将工作流服务应用程序设置为启动并通过 WCF 测试客户端调用它。
我是否有任何可能错误的设置会阻止断点工作?我知道设置了断点的活动正在被处理(基于结果),当断点被击中时,它们永远不会中断执行。
附加信息
- 所有项目都设置为使用调试配置工作流服务进行构建的
- 是使用 ASP.NET 开发服务器 (VS F5) 托管的 xamlx 工作流
For some reason none of the breakpoints I set on activities (through the designer) are working in a workflow service application project I'm debugging in VS2010. There's an mvc application that uses the workflow services and I've tried setting them both as startup projects and setting only the workflow service application as the startup and calling it via the WCF test client.
Is there any setting I could have wrong that would prevent breakpoints from working? I know the activities that have the breakpoints set are being processed (based on results) they just never break execution when the breakpoint is hit.
Additional info
- all projects are set to build with debug config
- workflow service is xamlx workflow being hosted with ASP.NET development server (VS F5)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
如果工作流的 xaml 文件已移动,断点将停止工作。
解决方法:打开xaml文件(作为代码,而不是在设计器中)并在顶级活动上找到XamlDebuggerXmlReader属性(只需进行文本搜索)并确保路径与文件的实际位置匹配(您可以右键单击文件名)选项卡并选择“复制完整路径”以获取文件的完整路径)。
请注意,指定的路径是相对于输出目录的,因此您可以将其设置为“../../Workflow1.xaml”,例如,以避免每次移动文件时都必须修复路径(或强制每个开发人员调整文件的本地路径)。
If workflow's xaml file has been moved, the breakpoints will stop working.
To solve: Open xaml file (as code, not in designer) and find XamlDebuggerXmlReader attribute on the top-level activity (just do textual search) and make sure that path matches the actual location of the file (you can right click the file name tab and select "Copy Full Path" to get file's full path).
Notice that specified path is relative to the output directory, so you can set it to "../../Workflow1.xaml" for example, to avoid having to fix the path every time you move the file (or forcing every developer to tweak the file for their local path).
最重要的是,包含设置断点的工作流的项目是启动项目。另一件通常会有所帮助的事情是创建一个仅包含 Debugger.Break() 的 CodeActivity 并将其添加到您的工作流程中。
The most important is that the project containing the workflow where the breakpoint is set is the startup project. Another thing that will often help is creating a CodeActivity with just Debugger.Break() in it and adding that to your workflow.
我不太确定,因为您没有提供足够的信息,所以这更多的是“一般”故障排除:
编辑:请检查这些http://msdn.microsoft.com/en-us/library/dd489403.aspx
I am not really sure because you don't provide enough information, so this is more of a "general" troubleshooting:
EDIT: please check these http://msdn.microsoft.com/en-us/library/dd489403.aspx
对我来说,断点不会在工作流上停止,因为我指向的 Xaml 文件不在正确的位置。
解决方案:右键单击xaml文件并检查标签:
Breakpoint wouldn't stop on Workflow for me because I was pointing to Xaml file which is not present at right location.
Solution: Right Click on the xaml file and Check the Tag: