-
-
Notifications
You must be signed in to change notification settings - Fork 503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C# (interactive) scripting example #315
Comments
Hi, There is very little documentation on this, if any. All methods defined in the The key method here is You will also need to use the Here is a snippet combining some of that knowledge to start debugging of a file on the disk. #r "dnSpy.Contracts.Debugger.dll"
#r "dnSpy.Contracts.Debugger.DotNet.dll"
#r "dnSpy.Contracts.Debugger.DotNet.CorDebug.dll"
using dnSpy.Contracts.Debugger;
using dnSpy.Contracts.Debugger.DotNet.CorDebug;
string assemblyPath = @"C:\Users\admin\desktop\KeyGenMe.exe";
var dbgManager = Resolve<DbgManager>();
var startOptions = new DotNetFrameworkStartDebuggingOptions();
startOptions.Filename = assemblyPath;
startOptions.WorkingDirectory = Path.GetDirectoryName(assemblyPath);
startOptions.BreakKind = PredefinedBreakKinds.EntryPoint;
dbgManager.Start(startOptions); You can of course access currently selected nodes or files by utilizing the appropriate service, aka the Hope this rather basic example is helpful. If you have any questions feel free to ask them in the form of a discussion on github! https://github.com/dnSpyEx/dnSpy/discussions |
Thank you for the detailed reply! I'll give it a try. |
Description
Hi. Thanks for the great work.
Could you please provide an example snippet to use for scripting
dnSpyEx
through C# interactive window?I'm interested in trying to script a patching process, but couldn't find the "entry-point" to the exposed functionality.
The text was updated successfully, but these errors were encountered: