Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DotPeek debug using attach to process, without source code?

I am currenlty trying to debug a service, but don't have the code located on the server, since there is alot and moving is not easy.

we are currently having issue with one server, and the only way I can debug the issue is by using dotpeek to decompile the .dlls and shown here @IgalTabachnik

Problem with this is the last step, my breakpoint gives an error and says that sourcecode is not availbale? which i don't get? ... it should be available through dotpeek?

Another things that might be an issue, is that I am debugging a schdule task, and I am not able to attach to a process while starting at the same time.

like image 261
famle Avatar asked Nov 20 '25 20:11

famle


1 Answers

If you're having problems with dotPeek + symbol server, I do recommend using dnSpy. To do that you need to:

  1. Open dnSpy as an administrator (dnspy-x86.exe or dnspy.exe depending on the target platform)
  2. Load .exe file that contains the code of the service into dnSpy via File->Open
  3. Navigate to the code where you want to put your breakpoint and set it there.
  4. Go to Debug-Attach to process. Since you run dnSpy as an Administrator you should see your service on the list.
  5. Select and attach to the process
  6. Trigger the breakpoint.
  7. debug

dnSpy generates it's own source code and has debugging capabilities so you can do everything in it. Its debugging experience is similar to Visual Studio's but it is not as reach as you can get in VS. Still, it can do its job.

like image 109
Paweł Łukasik Avatar answered Nov 22 '25 18:11

Paweł Łukasik



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!