你可以只用源$ C ​​$一个文件了C调试.NET应用程序? [英] Can you debug a .NET app with ONLY the source code of one file?

查看:134
本文介绍了你可以只用源$ C ​​$一个文件了C调试.NET应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要调试在Visual Studio中的应用程序,但我只有源$ C ​​$ C为1级。我只需要逐步完成在该文件中单一的功能,但我不明白我需要做的。我想的步骤通常是这样的:

I want to debug an application in Visual Studio but I ONLY have the source code for 1 class. I only need to step through a single function in that file, but I don't understand what I need to do it. I think the steps are normally something like this:

  1. 在VS打开文件
  2. 装载在符号(.PDB文件)
  3. 附加到正在运行的进程

我知道该怎么做#1和#3,但我也不怎么办#2没有.PDB文件。是否有可能生成.PDB文件这使它工作?谢谢!

I know how to do #1 and #3, but I don't how to do #2 without the .PDB file. Is it possible to generate the .PDB file for this to make it work? Thanks!

推荐答案

您需要的* .pdb文件(从您的帖子步骤2),这些文件包含的源$ C ​​$ c和编译的程序集的映射。所以,你的步骤是正确的。如果源文件具有与原文件的差异,设定对号允许源$ C ​​$ C是从原来的版本不同的BP的属性对话框。

You need *.pdb files (step 2 from your post) These files contain mapping between source code and compiled assembly. So your step are correct. If your source file has differences with original file, set check mark "Allow the source code to be different from the original version" in BP's properties dialog.

断点和跟踪在Visual Studio

如果您还没有PDB文件,你可以尝试使用反编译你的项目 Reflector.FileDisassembler FileGenerator对于反射。他们可以重新编译这些文件以获得PDBS

If you don't have PDB files you can try to decompile your project using Reflector.FileDisassembler or FileGenerator For Reflector. They you can recompile these files to get PDBs

另外一起来看看 Deblector - 调试插件的反射

Also take a look at Deblector - debugging addin for Reflector.

这篇关于你可以只用源$ C ​​$一个文件了C调试.NET应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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