At the current moment, what I'm doing is that I'm opening Unity
, double click on one of those scripts I've written, then MonoDevelop
gets opened, now I have to close unity and in MonoDevelop
I do Run >> Run with >> Unity Debugger
.
After this Unity gets opened and when I press the play button in unity the debugging session starts. But once only. If I stop this session in either Unity
or MonoDevelop
I have to repeat this whole procedure all over again, which is very tedious. I have to open Unity, close Unity, (I have to close it because next step which is Run >> Run with >> Unity Debugger
will open unity and if unity is already opened I'm getting error saying that only one instance of unity can open one project at a time).
What I'm asking is:
Is there any better workflow which would free me from this tedious switching on and off Unity, and every time I stop debugging session I would just start normally without doing these tedious repetitions?
Enable script debugging in a Unity player In Unity, open the Build Settings by selecting File > Build Settings. In the Build Settings window, mark the Development Build and Script Debugging checkboxes.
To debug a Unity application on a local computerMake sure the project you want to debug is opened in the Unity editor. In JetBrains Rider, open the corresponding Unity project solution. Set breakpoints by clicking the gutter next to a required line of code. Select the Attach to Unity Editor & Play run configuration.
In Visual Studio for Mac, with your Unity project opened, do Run -> Attach to Process, and select Unity Debugger. This will show you the list of Unity processes you can debug. For this to work, you game player has to be exported with the debug options, and of course, to be running.
Install Visual Studio and UnitySelect Install, or Modify if Visual Studio is already installed. Select the Workloads tab, then select the Game development with Unity workload. If Unity isn't already installed, select Unity Hub under Optional. Select Modify or Install to complete the installation.
Use 'Attach' in MonoDevelop's debug menu; you should be able to attach to the running Unity process that way. (You may need to ensure that the appropriate option is turned on in Unity's preferences).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With