开发者

Launching a .NET executable into a debugger

I have a .NET console app for which I do not have source c开发者_如何转开发ode. When I run it, no output is produced on the console.

It's possible in VS to attach to a running process, but I can't find out how to launch a new process with the debugger attached.


File | Open | Project/Solution and then open the desired exe file.

Not sure which debugging features are available that way. But you can run it from VS that way.

But I'd look at it in reflector and try find the bug by just looking. Reflector pro visual studio addin might even show the decompiled source while debugging, but as I don't own it, I'm not sure if that works.


Yes, you just need to create a new project (ideally the same project otherwise just a dummy one) and on the project properties select "Start external program" and select your exe.


You can go about this a backwards way: Create a new solution and project. Pick a C# Console Application project. It doesn't really matter how this project is setup. Then, bring up the properties of the project, select the Debug section. Configure this section to run your progoram. For instance, change the Start Action to Start external program, setup your command line arguments, etc. Then when you run the project, it will run your program.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜