如何在调试时通过Catel代码? [英] how to Step through Catel code while debugging ?

查看:208
本文介绍了如何在调试时通过Catel代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的项目中将Catel实现添加到我的某个视图(mainPage)后,我遇到了一个使我的Silverlight项目崩溃的bug。我唯一的表现是:在Catel.MVVM中发生类型'System.NullReferenceException'的第一次机会异常(在设置RootVisual〜之后) - 我找不到我做错了什么,因为我我打算与Catel建立长期合作关系,我认为通过Catel代码的步骤可能会派上用场,所以我尝试了所有以下步骤并失败了(任何帮助都将被赞赏..因为目前我被卡住了,不能找到任何东西):
$ b


  1. 下载的catel 3.9源文件(与我的nuget包相同)并尝试构建它..失败,错误:
    E:\Dev\Catel-3.9.0\src\Catel.Core\Catel.Core.SL5\Fody.targets(51,5):错误MSB4036:Fody .WeavingTask任务未找到。检查以下内容:1.)项目文件中的任务名称与任务类别的名称相同。 2.)任务类是public并实现Microsoft.Build.Framework.ITask接口。 3.)任务在项目文件或E:\WINDOWS\Microsoft.NET\Framework\v4.0.30319目录中的* .tasks文件中正确声明。 - 试图找出原因并找出原因并克服这一点,导致我无处可去。 :(


  2. 我在Catel文档中遵循了这个单步执行代码指令,但注意到真的发生了(我正在使用VS2010 ..这是一个问题

  3. =nofollow> https://github.com/GeertvanHorrik/GitHubLink 关于使用GitHubLink在调试时帮助您逐步浏览Catel代码我从 https://github.com/GeertvanHorrik/GitHubLink/releases/tag/1.3.0 ...但运行这个,甚至只有githublink.exe -help标志引发了异常。


  4. 我下载了Githublink-master源文件,但是加载了0个项目GithubLink项目文件与当前版本的VS不兼容 - 我使用VS2010)


    任何人都可以帮助我要么阴影索姆e轻或:


    • 克服了我为catel收到的构建错误(第1)

    • 指导我如何设置&步入凯特尔?

    • 共享catel libs的pdb文件
    • >它完全取决于您使用的版本。如果您使用的是最新官方版本(3.9),则只能通过克隆 master 分支并自行构建PDB文件来完成代码。



      在通过NuGet发布的最新预发布版本(即将推出的4.0版本)中,您只需启用源服务器复选框即可。



      请注意,您绝对不应该使用GitHubLink (仅限开发人员)(我们在构建Catel期间运行它)。



      关于Fody任务:看起来NuGet包尚未恢复你的身边。在 lib 文件夹中有一个RestorePackages.bat,您可以运行它来恢复软件包。


      After adding Catel implementation to one of my views(mainPage) in my project I have a bug that crashes my Silverlight project. The only indication I have is :" A first chance exception of type 'System.NullReferenceException' occurred in Catel.MVVM " (just about after setting the RootVisual~) - I can't find what I'm doing wrong, and since I am planing on a long-term relationship with Catel I thought that stepping through Catel code might come in handy, so I tried and failed in all the following steps (any help will be appreciated.. because currently I'm stuck and can't find anything):

      1. downloaded catel 3.9 source files (same as my nuget package) and tried building it.. failed with this error : E:\Dev\Catel-3.9.0\src\Catel.Core\Catel.Core.SL5\Fody.targets(51,5): error MSB4036: The "Fody.WeavingTask" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with in the project file, or in the *.tasks files located in the "E:\WINDOWS\Microsoft.NET\Framework\v4.0.30319" directory. - trying to search and figure the reasons and overcome this, lead me to nowhere. :(

      2. i have followed this "Stepping through the code" instruction in Catel documentation but noting really happened (I'm using VS2010..is this an issue ?? )

      3. I read this article & readme.md at : https://github.com/GeertvanHorrik/GitHubLink about using GitHubLink to help you stepping through Catel code while debugging. I downloaded the release GitHubLink 1.3.0 from https://github.com/GeertvanHorrik/GitHubLink/releases/tag/1.3.0 ... but running this even with just the githublink.exe -help flag had thrown a exception..

      4. I downloaded the Githublink-master source files but 0 projects were loaded (the GithubLink project file is incompatible with the current version of VS - I'm using VS2010)

      can anyone help me either shade some light or:

      • overcome the build error I receive for catel (no.1)
      • instruct me how to set & step into catel ?
      • share the pdb files for Catel libs

      解决方案

      It completely depends on the version you are using. If you are using the latest official one (3.9), stepping through the code is only possible by cloning the master branch and building the PDB files yourself.

      In the latest prerelease versions via NuGet (the upcoming 4.0 version) you only have to enable the source server checkbox.

      Note that you should never have to use GitHubLink yourself, that is for developers only (we run it during the build of Catel).

      About the Fody task: it looks like the NuGet packages have not yet been restored on your side. In the lib folder there is a RestorePackages.bat which you can run to restore the packages.

      这篇关于如何在调试时通过Catel代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆