DEV Community

Cover image for Debugging the Umbraco source code for specific version
Dave Woestenborghs
Dave Woestenborghs

Posted on

Debugging the Umbraco source code for specific version

Today I had to debug the Umbraco source code to pinpoint a performance issue.

I already had a backup of the umbraco database from our live environment restored on my local machine.

Normally when I contribute to the Umbraco CMS, I work on my own fork on the contrib branch before creating a pull request.

Problem is that I had to debug Umbraco 10.6.1 and the contrib branch is already V12.x. There is v10/dev branch, but that is already running Umbraco 10.7.x

Luckily Umbraco tags all the releases on github so I went ahead and downloaded the source code for v10.6.1

I followed the steps to get up and running from the documentation.

From a command line I did the following to build the front end code :

cd src\Umbraco.Web.UI.Client
npm install
npm run dev 
Enter fullscreen mode Exit fullscreen mode

This succeeded without issues.

Then I tried to build and run the CMS from a command line as described in the documentation :

dotnet watch --project .\src\Umbraco.Web.UI\Umbraco.Web.UI.csproj
Enter fullscreen mode Exit fullscreen mode

But here I ran into a issue.

I saw the following errors in my console :

error MSB4044: The "GetUmbracoBuildVersion" task was not given a value for the required parameter "Git CommitIdShort".

When building the source code on my forked repository I don't see this error.

This is because Umbraco is using GitVersion for semantic versioning.
This requires a git repository and at least one commit. When you just download the code you don't have a git repository.

This was easily fixed by running the following commands :

git init
git add .
git commit -m "initial"
Enter fullscreen mode Exit fullscreen mode

After that I could run the CMS without any issues.

So I hope this helps you when you run into this issue.

Top comments (0)