Revision Difference
Setting_up_Rider#548909
<cat>Code.Intro</cat>
<title>Setting up Rider</title>
# Get Rider
⤶
Download or buy **Rider** here: [LINK](https://www.jetbrains.com/rider/)
⤶
You got two options to choose from
[Buy Rider](https://www.jetbrains.com/rider/buy/#personal?billing=monthly) or start an [30 Day Evaluation](https://www.jetbrains.com/rider/download/)⤶
# Solution
⤶
To get the `.sln` file, you need to start the game. Then your `s&box.sln` should be in the root directory.
⤶
*[Please note you will have to do this every time you add an addon to your game before you are able to edit.]*⤶
⤶
1. Click Open⤶
<upload src="a9bbd/8d95f3af00e11e6.png" size="26266" name="image.png" />⤶
⤶
2. Go to your root directory⤶
3. Select `s&box.sln`⤶
<upload src="a9bbd/8d95f3e0f1a8ac0.png" size="46487" name="image.png" />
⤶
4. Here is your addon⤶
<upload src="a9bbd/8d95f3bd8195124.png" size="19775" name="image.png" />⤶
⤶
In this case, we'll create a Gamemode, see here for [detailed instructions](https://wiki.facepunch.com/sbox/Your_First_Project)
⤶
To get the `.sln` file, you need to start the game, then your `s&box.sln` should be in the root directory. ⤶
⤶
<note>⤶
You will have to do this every time you add an addon to your game before you are able to edit.⤶
</note>⤶
⤶
## Opening the Solution⤶
<upload src="b3cb9/8db0558d4dbedc2.png" size="35667" name="image.png" />
⤶
## Finding the Solution⤶
Go into the GameFiles of S&box and select `s&box.sln`⤶
<upload src="b3cb9/8db0559e3b326a9.png" size="54931" name="image.png" />⤶
⤶
## Structure⤶
The Gamemode is under `Games`⤶
⤶
The S&box API and UI is under `Core`⤶
⤶
The Tools is under `Tools`⤶
⤶
<upload src="b3cb9/8db055aac1caa87.png" size="16133" name="image.png" />⤶
# Debugging
⤶
1. Run your `sbox-dev` and start your `game`⤶
⤶
<upload src="a9bbd/8d95f3c6ffe3ade.png" size="69757" name="image.png" />⤶
⤶
2. In Rider click `Run -> Attach to process...`⤶
<upload src="a9bbd/8d95f3cae1b68ea.png" size="56587" name="image.png" />⤶
⤶
3. Select S&Box process⤶
<upload src="a9bbd/8d95f3d48ea210e.png" size="11372" name="image.png" />⤶
⤶
4. Start debugging! :3⤶
⤶
## Starting the Game⤶
Start your previously created `game`⤶
⤶
Inside the GameFiles run `sbox-dev.exe`⤶
⤶
Inside Steam it is called `Game Editor`⤶
⤶
<upload src="b3cb9/8db055c9cedcae1.png" size="11414" name="image.png" />⤶
⤶
(1) If your `game` isn't selected yet, do so⤶
⤶
(2) Start it.⤶
⤶
## Attaching to the Procces⤶
⤶
In Rider click `Run -> Attach to process...` or see here⤶
<upload src="b3cb9/8db055d0967036b.png" size="19895" name="image.png" />⤶
⤶
### Selecting the S&Box process⤶
⤶
1 View the available list of all debuggers⤶
⤶
2 Narrow it down to .NET⤶
⤶
3 Filter by sbox only⤶
⤶
4 Attach - Done!⤶
⤶
<upload src="b3cb9/8db055d78a35bad.png" size="34944" name="image.png" />⤶
⤶
### Start debugging!⤶
<upload src="a9bbd/8d95f3d737dfa75.png" size="56749" name="image.png" />
# Troubleshooting
* If you are getting errors on everything, make sure you have the [.NET 7 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/7.0) installed.
* If you are getting random errors from stuff that should be code generated, [ensure you have Roslyn Analyzers enabled](https://www.jetbrains.com/help/rider/Settings_Roslyn_Analyzers.html).