How to edit/debug the Stride Engine code? #1116
-
UPDATE: SEE METHOD 3 FOR "BEST" SOLUTION #1116 (comment) Method 1: add your game to Stride.slnSteps I have taken that works
Using this method, you can:
Using this method, you can not:
Known issues:
Method 2: Stride.sln side-by-sidesee Tebjan reply below. Also see https://www.youtube.com/watch?v=bXSC9o-EaR8 What does not work
Wish list
Additional ResourcesI didn't find these helpful but maybe you will.... |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
Thanks for starting this discussion, it's definitely asked frequently. From an engineering standpoint, you shouldn't modify the Stride solution to debug it. The clean approach is:
Now you can step into each method with F11 while you are debugging. Visual studio should automatically find the Stride source files. If you want to hit a specific breakpoint in the Stride solution, start the game without a debugger and attach the visual studio instance with the Stride solution to the running game. So you need a local build of stride and then you can set the stride version of any game to that version to compile with the local build of stride. Just make sure that you have started game studio one time so the nuget restore of game studio did happen. This is how we do it in our workflow and as far as I know, the original authors of Stride too. Hope that helps... |
Beta Was this translation helpful? Give feedback.
-
Method 3:
|
Beta Was this translation helpful? Give feedback.
-
Method 4: Local NuGet package sources.I use this method mostly to edit stride source code. When Stride is built you get a folder To use these NuGets.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSourceMapping>
<!-- key value for <packageSource> should match key values from <packageSources> element -->
<packageSource key="nuget.org">
<package pattern="*" />
</packageSource>
<packageSource key="stride.local">
<package pattern="Stride" />
<package pattern="Stride.*" />
</packageSource>
</packageSourceMapping>
</configuration>
This config file will map Stride NuGet to the local folder. When you edit stride source just generate to update local NuGets and rebuild your project to refresh visual studio cache. I haven't tested debugging. I think attaching to process with Stride solution should be ok. |
Beta Was this translation helpful? Give feedback.
-
Which of these 5 methods posted here is the best? (or which is the best for each context type?) |
Beta Was this translation helpful? Give feedback.
Thanks for starting this discussion, it's definitely asked frequently.
From an engineering standpoint, you shouldn't modify the Stride solution to debug it.
The clean approach is:
Now you can step into each method with F11 while you are debugging. Visual studio should automatically find the Stride source files.
If you want to hit a specific breakpoint in the Stride solution, start the game without a debugger and attach the visual studio instance with the Stride solution to the running game.
So you need a local build of stride and then you can set the stride version o…