Get the App
SLTechnology News&Howtos  ›  Servers  › 

Net decompiler debug artifact dnSpy how to use

Shulou Source: shulou.com Published: 2022-05-31 22:26:50 09月22日 Update

This article will explain in detail how to use the .NET decompiler and debug artifact dnSpy. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have some understanding of the relevant knowledge after reading this article.

(the .NET Framework4.7.1 is included in the built-in. If you are prompted to install it, you can extract it to find the .NET Framework 4.7.1-x86-x64-AllOS-ENU.exe installation.)

The specific steps are as follows:

Add system environment variable, COMPLUS_ZapDisable = 1

If you need to debug the IIS process, go to the C:\ Windows\ System32\ inetsrv directory to execute appcmd list wp to view the corresponding application pool process ID

Open dnspy, debug-- > attach to a process-- > Select the appropriate process ID-- > attach (multiple processes can be attached at the same time)

Debug-- > window-- > Module-- > search for assemblies to debug-- > double click

Find the class you want to debug in the assembly explorer. Open it and break the point.

Right-click the class file to be modified-- > Edit class / method-- > modify class-- > compile

File-- > Save module-- > Select the path to save-- > Save

Just replace the saved recompiled assembly to the target path

Execute iisreset (in the case of IIS applications)

Figure 1: configuring environment variables

Figure 2: get the process ID corresponding to the IIS site

Figure 3: how to attach a process and find the assembly to debug

Figure 4: how to modify the code to recompile and export the assembly

Net decompiler debugging artifact dnSpy on how to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: Processes programs compilations attachments artifacts content variables files articles more modules environment knowledge articles paths applications choices good code at the same time Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Shulou Tech Info OPPO Reno MySQL NVidia