如何在visual studio 2008中进行调试express c#this senario [英] How to debug in visual studio 2008 express c# this senario

查看:181
本文介绍了如何在visual studio 2008中进行调试express c#this senario的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有c#桌面应用程序加载插件。
加载插件的格式就是这样:
插件及其配置文件在一个文件中压缩,并且当托管应用程序加载时,必须位于包中dir
拉入Unpacked目录并加载插件
现在我喜欢调试我创建的插件,但是如何?

i已经做了:

 < StartAction>程序< / StartAction> 
< StartProgram> C:\Program Files\app\MyAppStudio.exe< / StartProgram>

它的工作正常,但它dosnt加载我的插件。即使我将输出路径定义为包目录或未打包目录。

该怎么办?调试dll?



更新:

i认为现在我,如果我错了,但我需要专业版和我的使用附件来处理功能。

解决方案

有很多方法。其中一种方法是使用鞭子。但这并不总是一个好的选择。您还可以使用Visual Studio的窗口来监视程序中变量(变量,对象变量等)的变化(我不记得允许您执行的窗口部分的名称),但这是一个有点困难。



我使用的一种方法是添加在某些事情完成或没有完成时引出变量或消息的函数已经完成或暂停进程的功能。或手工调试。这很容易理解,但需要一些时间才能写。



例如:我不知道一个函数启动时必须启动。我添加一行显示消息我已经开始工作。如果出现这样的消息,表示该功能正在被激活。我不知道一个变量是否正确计算。我添加一行,显示变量的新旧值。或者如果我想有一些时间来考虑当前的结果,我只是在收到当前值之后暂停该程序。等等,等等...这也应该适用于其他语言。



这个方法真的很方便。我使用它,当编译器的调试功能无法帮助我。需要一些时间来添加代码进行调试,但这是值得的。没有什么更有效的手工做某事。


i have c# desktop application that loads plugins . the format it loads the plugins is like this: the plugin and its configuration files are ziped in one file and have to be in "Packages" dir when the hosting application loads it extract the zip into the "Unpacked" dir and loades the plug in. now i like to debug the plugin i created but how ?
i already did the :

<StartAction>Program</StartAction>
<StartProgram>C:\Program Files\app\MyAppStudio.exe</StartProgram>

and its working fine , but it dosnt load my plugin . even if i define the output path to be the "Packages" dir or the "Unpacked" dir .
what to do ? to debug the dll?

UPDATE:
i think current me if i wrong but i need the pro version and mybe to use attache to process function.

解决方案

There are many ways. One of the ways is to use brakepoints. But this is not always a good choice. You can also use Visual Studio's window to monitor how are things (variables, object variables, e.t.c.) changing in the program (I can't remember the name of the part of the window that allows you to do that), but this is a bit hard to do.

One of the ways that I use is adding functions that bring out variables or messages when something has been done, is being done or it hasn't been done or functions that pause the process. Or debugging by hand. It's simple to understand, but it takes some time to write.

For example: I don't know is a function starts when it has to start. I add a line that brings out the message "I have started working". If such message appears, means that the function is getting activated. I'm not sure if a variable is being calculated correctly. I add a line that brings out the new and old values of the variables. Or if I want to have some time to think about the current results, I just pause the program after I receive the current values. And so on, and so on... This should also works on other languages.

This method is really handy. I use it when the compiler's debugging features can't help me. It takes some time to add the code for debugging, but it's worth it. There is nothing more efficient that doing something by hand.

这篇关于如何在visual studio 2008中进行调试express c#this senario的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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