Using Windows game bar for testing

Using Windows game bar for testing

Ever ran into a problem when testing a new feature, but can't quite remember how you produced the problem?

Windows game bar is built into windows and can help you record your actions as you go, allowing you to watch back what you did and hopefully allow you to reproduce the issue.

First things first, the key feature here is obviously - using it to record the screen! But recording everything all the time and remembering to begin recording before you start not only sounds like something I would forget but also will end up taking up large amounts of space on your hard disk (video is expensive).

Fortunately, the windows game bar recorder has a neat feature that will constantly record the last X amount of time you have been focusing on the "game" window. This means that as long as we tell the game bar that, for example, Chrome is a game application we can tell the windows game bar to record the last X amount of time all the time, and anything after that point gets deleted.

Since the time being recording is rolling it keeps the file size small but you cant access it any time, you still need to tell the recorder that you want to keep the footage of what has just happened, this can be done through a keyboard shortcut ("win + alt + g" or "win + g" by default) or by bringing up the game bar and clicking a button on there.

This means that if you see a problem while testing you can save the recording and rewatch it to find out how the problem occurred.


Setting up background recording

Setting up chrome to be recognised as a game

First load up chrome, and press the keyboard shortcut to bring up the game bar (win + g)

Once this has loaded you should be able to see a bar labeled "Broadcast & capture" this is the important bar for us, as this contains all the features for screen capture.

Opening the game bar on chrome

If this cannot be seen then you can bring it up from the main bar by pressing the button with the camera icon. 

From here you could press the circle icon to begin recording any window you currently have in focus, useful but not what we are looking for here.

The button that we want to press it the "Record last X time" button (shown on the right).

If we press this button right now there is a problem that occurs. Either the current window isn't recognised by the system as a game, or we aren't set up to do recording this way.

The solution to the first problem is simple, we can just tell it that whatever window we are on is a game and that will allow it to start the passive recording.

However if you need to manually enable background recording you will need a couple of extra steps.

Firstly you will need to open the settings app on your computer, which can be accessed by searching the start menu for "Settings".

Next you can either search for Captures or Game DVR. This should take you to a screen similar to the one shown on the image on the right. Simply enable the setting "Record in the background while I'm playing a game"

An important note, in the settings menu shown above you, can change the duration of the background recording, and also if you want to have audio recorded, recording audio will capture sound coming from any application on your computer not just the window in question, also if you have a microphone connected it can be recorded as well, just make sure that the settings are configured to match your requirements.

And that's it! In future, if you run into a problem you can open the game bar and get it to save its background recording for you to review at your leisure.

About the Author

Gregory Dove, Developer

Greg joined Gibe as an intern and is now a fully fledged productive member of our team.