Note that when you step in dnSpy, it steps one IL instruction at a time (in which case one single expression can take multiple steps to move over). Step into, step over, set more breakpoints (via the top bar).If everything worked correctly, the execution will stop on the breakpoint:įrom there, you can do same things like in the normal debugger: Port (only in Unity (Connect) engine): 55555įinally, press OK to start the game (or to attach dnSpy to an already running game).IP Address (only in Unity (Connect) engine): Leave it blank.You can optionally set it to higher values if the game loads too slow. Timeout (s) (only in Unity engine): 30.Executable (only in Unity engine): Locate and select the game's executable from the game's installation directory.Unity (Connect) if you want to start debugging when the game is on.Unity if you want dnSpy to start the game for you.Debug Engine: Select one of the following:.Select Debug > Start Debugging to open up the Debug Program dialog. Running the game via dnSpyĪfter you have set the breakpoints, you can start debugging the game. In that case you can change dnSpy to show the precise IL code from the dropdown in the top bar. Note that some code might not be selectable. Next, select Add breakpoint to set the breakpoint: To set a breakpoint, navigate the assembly you want to debug and right click on the piece of code you want to debug. Hey guys, screenshot: i started a singleplayer monsoon game, set to pause over the console, tried to type cheats the base is cheats0 i want cheats1 typed it, but it doesnt do anything, cause i cant give me giverandomitem what am i missing maybe only on drizzle or outside of a game settings cheats to 1. You can change the settings of dnSpy via View > Options. You must select the DLL that is in your BepInEx folder, and not the one in your Visual Studio solution! Next, drag the plugins DLLs you want to debug into dnSpy. You can type any number between 1-16 (16 is the maximum) after these. You can type help for a bunch of commands, but the ones youll be using are. All you need to do is open up the console with CTRL + ALT +. You can pick any of the available versions.Įxtract the downloaded archive and run dnSpy. So lets put this in the most basic way possible. Setting up dnSpy and setting breakpointsĭownload the latest version of dnSpy. Finally, locate the same DLL in your game folder and replace it with the one from dnSpy. Open the downloaded archive and locate mono.dll that corresponds to your Unity game version andĮxecutable target (32 bit or 64 bit). That corresponds to the Unity version of your game:įor example, in the log above Unity version is 5.4.0, in which case one has to download Unity-debugging-5.x.zip. Next, head to dnSpy releases and download one of the debug Mono packages Which will log the Unity version of the game in the console (or into BepInEx/LogOutput.txt): BepInEx 5.0.1.0. You can do that by checking file properties of the game EXE or by running BepInEx, This guide's step is mainly a basic overview of what to do.įor a full guide on turning your game into a debug build, check out the offical dnSpy's guide on this topic.įirst, the game's mono runtime has to be swapped to one that supports debugging with dnSpy.įor that, you need to know the Unity version your game has been built against.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |