Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Launching a .NET executable into a debugger

I have a .NET console app for which I do not have source code. 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.

like image 671
Drew Noakes Avatar asked Mar 22 '26 07:03

Drew Noakes


2 Answers

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.

like image 149
CodesInChaos Avatar answered Mar 24 '26 22:03

CodesInChaos


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.

like image 43
Aliostad Avatar answered Mar 24 '26 21:03

Aliostad