dnSpyEx / dnSpy

Unofficial revival of the well known .NET debugger and assembly editor, dnSpy
GNU General Public License v3.0
7.01k stars 459 forks source link

Not able to debug assembly #371

Open greenozon opened 1 month ago

greenozon commented 1 month ago

dnSpyEx version

6.5.1

Describe the Bug

I'd like to investigate some weird fresh bug in latest ILSpy and I wanted to debug it, but all of a sudden I"ve hit strange error on debug start:

image

from ILSpy about:

ILSpy version 9.0.0.7814-preview2+c66733f353a24174dbc7c9283333b50f796cd426 .NET version 8.0.8+08338fcaa5c9b9a8190abb99222fed12aaba956c

How To Reproduce

Download CI build from master, eg: ILSpy version 9.0.0.7814-preview2 ILSpy 9.0.0.7814-preview2 (Debug)

Expected Behavior

Debugger starts up successfully

Actual Behavior

see error window above

Additional Context

No response

ElektroKill commented 4 weeks ago

Hey,

I'm unable to reproduce this issue using the latest dnSpyEx CI build. Both .net framework and .net-x64 compiled binaries have no trouble debugging the ILSpy build you linked.

greenozon commented 3 weeks ago

Oh Gosh! what assembly did you try while trying to repro? I was trying ILSpy.exe but seems it was a terrible mistake, right? how about adding some reminder (error box) for forgetful person like me/ :)

ElektroKill commented 3 weeks ago

Starting the debugging with either ILSpy.dll or ILSpy.exe works for me. dnSpy should identify .NET apphost .exe files and debug them appropriately

greenozon commented 3 weeks ago

OK, then I've hit 100% repro trying to debug ILSpy.exe

are there any hints how could I dig more info to track this case down?

ElektroKill commented 3 weeks ago

Honestly, I have no clue what could be going on here since CorDebug does not seem to be reporting any kind of meaningful error code to indicate what is actually going wrong. Are you perhaps debugging ILSpy.exe with the .NET Framework engine rather than the .NET engine?

greenozon commented 3 weeks ago

is it possible to debug dnSpy while it tries to debug ILSpy?

greenozon commented 3 weeks ago

yes, it was .NET in the drop-down control "Debug engine"

ElektroKill commented 3 weeks ago

is it possible to debug dnSpy while it tries to debug ILSpy?

Yes you can either use multiple instances of dnSpy:

  1. Start dnSpy
  2. Open dnSpy.exe in dnSpy
  3. Start debugging
  4. You are now debugging dnSpy and can debug another file

or you can just pull in the dnSpy source from GitHub and open it in an IDE on windows.