Waiting..
Auto Scroll
Sync
Top
Bottom
Select text to annotate, Click play in YouTube to begin
00:00:00
if you get a copy of remedy bg it's literally just like a zip file all you have to do is just grab an executable and if you want to update it you just download a new executable just one executable and if that executable is
00:00:13
anywhere on your machine you double click it and it runs and look at how fast that is it's instant you double click it and your debugger is running let me go ahead and set up a build here it's exactly like you would expect in
00:00:25
the session menu there's just a thing where you can say what it is you want to debug it also has a nice feature where you can just hit this plus and you can make as many of these configs as you want once you set these up you can switch between them quickly so if you
00:00:37
want to run your debug you just hit ctrl shift 1 if you want to run your release hit ctrl shift 2 you have the ability to hit f5 and your game runs or you know whatever your program is that you're running like you see it here you can do
00:00:49
hover you can do the same sort of stuff you would expect to do in any other debugger where you can kind of like pop things open quickly what i tend to do is i just you know i type them into the watch window the watch window works exactly as you would expect however
00:01:01
unlike nowadays for things like visual studio for example you actually have extremely fast updating of the watch window and this is pretty important if i for example add ray origin single to the watch window you can see that
00:01:14
it's a vector here with an xyz if i hold down the f5 button you can see just how fast the watch window updates it's always instant so when i hit this breakpoint i'm never waiting to see any
00:01:28
time i let go i know that the watch window is actually up to date i realize that's a ridiculous thing to say but if you were to do this in visual studio it you wouldn't be able to do that it's gotten so slow and late they basically kick those updates i think to a delays
00:01:41
you can't do anything like this so i really appreciate this aspect of remedy why i'm trying to save myself time i don't want to be waiting for my debugger because the only reason i'm using a debugger is to save me time if the
00:01:55
debugger itself is sluggish then the whole point of using a debugger goes away it's not helping me anymore while we're in the lighting code which happens to be heavily multi-threaded if i were to start stepping through one of the
00:02:07
things you can see is it becomes sort of nonsensical i'm stepping and it's just going all over the place and you might be like what is happening is that broken but actually that's the behavior you would see in most debuggers what's actually happening there if you look
00:02:19
down here at the thread list is we're actually seeing multiple different threads hitting these lines one at a time it's really annoying and if you use something like visual studio you have to
00:02:31
go do something called freezing threads where you right click on all the threads and hit freeze and it just sucks it's a really bad workflow so what remedy bg does that's really awesome is it uses a
00:02:43
digital audio workstation kind of a framework for it where not only is there the ability to freeze or mute basically threads so that they won't do anything there's also a solo option so what you can do is just click solo and it will
00:02:56
automatically freeze all of the threads that aren't that thread just as long as i keep that going so i can single step through what it's doing then as soon as i'm done i just one click again and i'm back to the state that i was in before
00:03:09
where all the threads are running so it's a really really great piece of human factors that again just makes it so that your debugging can be streamlined fast and find the bug which is what you were trying to do rather than sitting around handling your
00:03:21
debugger which is not ever what you want to do break points in remedy bg are actually really great there are ways that we can add conditions for example to our break points that might not seem particularly interesting because most other debuggers
00:03:34
do have the ability to set break points on conditions however the very interesting part of remedy bg is it's way way faster so unlike visual studio for example where when you set a condition
00:03:47
on a breakpoint your execution time plummets setting condition here is really not that bad you can run almost at speed and still put conditions in there's not much of a way to really demonstrate that to you without showing you like the same conditional break
00:04:00
point in visual studio and in remedy but if you're the kind of person who likes that conditional breakpoints you know how slow they are in something like visual studio try remedy bg setting the same break point you will be shocked at how much faster it is so obviously not a
00:04:13
lot to say about the other features here there's you know a pretty straightforward stuff for like a register view one of the nice things that remedy lets you do is construct views even of registers if you want to so in here you can say like uh xmm0 for
00:04:24
example and if i want to see this as something like four floats and it formats it in a really nice way right it's like okay there's that value of that as floats and similarly i can actually ask for anything that happens
00:04:36
to be that type as a ps as well so if like one of my values like max xyz for example i can ask for that to be viewed that way as well so if i say like ps it
00:04:47
will show me one of my named variables in the same format obviously you can always switch to viewing into something else these it isn't packed doubles but if i ask it to be packed doubles it would show it to me that way uh similarly if i wanted four packed
00:05:01
integers i can get those uh unsigned and these are just the same nomenclature that's used in the intel intrinsics guide so if you can remember it for the intrinsics you also now know it for remedy bg which is also great okay so a
00:05:15
lot of times in game development you will have things like four by three matrices three by four matrices four by four matrices things like that so if you do have a matrix like we have here like our projection matrix you can see that if you expand it you will see basically
00:05:28
the same thing you would see in any other debugger right like you just got these drop downs here and what you end up with is something that you can read like it's not that bad i can see all the values but it's definitely not as convenient as it could be because it's
00:05:40
kind of hard to keep track especially when you kind of get these things they don't line up when you have some that are like high precision they're low precision and so on so remedy bg has this nice modifier just put comma mtx and that will automatically show you
00:05:52
something as a 4x4 matrix you can also say mtx like for x3 or something if you want a different dimension matrix so if you have something like a 4x3 matrix instead of a 4x4 matrix you can still see it this makes things a lot easier
00:06:06
because now you can see the matrix looking the way that you would write it by hand if you were trying to write it in math form which just makes it a lot easier to work with because now you can actually see what the heck is going on in your matrices which is awesome so a
00:06:20
lot of times what you'll have in code at least if you do it the way i do is you end up with code that looks something like this where you want to be able to represent strings as something that has like a pointer to the data for the
00:06:33
string and also like a count in this case we have a tokenizer it is tokenized a comment in our asset source file and you can see that it says that the string is 355 characters long and that this is
00:06:45
the data so if i was to add this to the watch window we would get exactly what you would expect to get in any debugger which is you know honestly kind of useless it's not horrible it shows us a little preview but it's fairly useless if you're actually trying to bug this
00:06:58
and you want to see like what the actual data is now in visual studio there's this crappy little like magnifying glass you can click on and it kind of sucks because it doesn't update in real time it's also not in the watch window where i want it pops up this separate thing
00:07:10
remedy bg is awesome because it actually lets you just specify exactly the thing you wanted to see so for example i've got this token.text i can say let's see token.textdata for a particular count so
00:07:23
tokentextcount if i open it up i get the same thing you would expect to see in visual studio where it's all the individual character codes adding just the word str in front of it magically turns it into a great little inline window that's like a complete little
00:07:37
text display of the entire thing right and it still has that little magnifying glass that will actually pop up the window like it has in visual studio but since i don't really even care about that i usually
00:07:49
just leave it exactly like this which allows me to see everything that i wanted to see without actually having to leave the comfort of my watch window to me this is like a total game changer because all my strings work this way i
00:08:00
never use null terminated strings in my actual coding day-to-day so just this feature makes it so much easier to debug string stuff when i'm working on string heavy things it's so nice because now my watch window just works i can see all
00:08:14
the strings and i don't have to worry about popping up these stupid windows to actually see what's going on remedy bg however doesn't stop there if you have something like in this case we have a background thread that's loading asset
00:08:25
data and it's got this work order here you can see it's like a struct and what i've done is i've just told the thread you know there's this destination buffer and it's just blind memory right this is just a loader thread it doesn't really know what it's loading and so when i
00:08:37
need to debug code like this i need to be able to look at this destination without really knowing anything it doesn't have like a structure to it right it's just a bunch of binary data that got loaded and i now need to go look to see if that binary data comports
00:08:50
with what i think that it should look like and so obviously remedy bg does support the standard sort of thing you would do which is i can open a couple memory windows which are just blind memory windows and i can put addresses in here which is what you would normally
00:09:01
expect to do so for example if i want to view the memory that's at this particular place i can do that and see a normal memory view of it exactly as you would expect however when you're working with code that does a lot of memory
00:09:14
stuff you would rather have the watch window show you a bunch of things right in line together that are different memory locations so that you can easily see memory moving back and forth and see when you're reading from one thing or writing to another remedy lets you do
00:09:27
that really easily you can type in a format specifier for memory so for example if i want to look at double words for example 32-bit values the code for that is dd and then i can just say whatever the size is that i
00:09:40
want to look at that will put an inline memory view right here that i can have in my memory window at all times you don't actually have to create a separate memory window for it i can just have them in the watch window so if there
00:09:52
were other things i want to do i could just stack them up here furthermore i can always pop this out into its own memory window so if i do decide at any time that i want in memory window just displaying this particular location in
00:10:06
this particular format i can always just branch those off really quickly close them really quickly and paste together whatever i actually want to see in terms of memory so memory becomes as easy as a
00:10:18
watch which is a really big boon to people who actually need to work with these low-level memory kinds of things from day to day i can also ask for other formats so for example if i want word data instead i can i can get quad words
00:10:31
as well so again you can just kind of like ask for how you want the memory formatted just like you would in normal memory window but here you can do it in like a shorthand notation so it's quick to put it into the watch window let's suppose that i'm down in the code
00:10:44
here and i'm looking at some stuff i'm working on this thing there's an enclosing kind of structure called a sim region that has a bunch of information it's kind of like a bundling structure that it tells me the context like it's got like where the origin is and all
00:10:56
these sorts of things and when i go into certain leaf functions like let's say i'm going into this draw ground cover function here you can see that i'm not going to be passing that in so once i get into draw ground cover you can see
00:11:08
that i lose the ability to view that sim region and so remedy bg has a lot of tools for working with the scope that make it easy to solve this problem if you want to just save yourself time so
00:11:21
one way that this might work is there's a little lock icon that i can click on when i click on the lock icon and then i step in here it's just not going to update this sim region variable so while i'm in here in draw ground cover the sim
00:11:34
region itself is going to stay the same value that it used to be so it won't actually change to the fact that there isn't a sim region in this particular scope that's a really easy way to do that but that's not the only way you
00:11:47
could do that so for example if we actually maybe weren't ever out here like let's suppose that my break point hadn't been set on draw ground cover and my break point was actually set here so when i run to here simregen never had a value to begin with in fact let's say i
00:12:00
had never even typed it in and i type it in now i type sim region well it's not going to find it so instead of having to go hunt up the stack like the way you would do this in traditional debugger is you go to call stack you go up here and
00:12:11
find sim region like that right that's not very useful in remedy it becomes more useful because i can quickly quick lock and then come back here so that's one solution but what if it was way up the stack there in fact we could imagine a situation where it was way up the
00:12:24
stack let's say out here as game state right so i wasn't even looking at sim region i was maybe looking at game state so in here you know i i type in uh game state and now i'm sitting here walking the
00:12:36
stack to like find out where it actually is so i can lock it if instead i just prefix it with a little scope this is the scope specifying syntax in remedy bg it's just to enclose in brackets what you want to do star says find the first
00:12:50
one of these by looking up the stack exactly what i just did clicking through call stack until i saw it that's what remedy is going to do and now i don't have to worry about which function i'm in i can just step through and as long
00:13:02
as i'm underneath somebody who knew what the game state was were all good if you are working on code that's a little more complicated in terms of how the call graph works let's say you're in something where you've got a recursive
00:13:15
function and you just want to know what the previous one was or what two up was you can also in here put a specific number one says go one up and see if it's there two says go two up see if
00:13:27
it's there three says go three up and so we can look at different ones by putting different numbers in there you can imagine something where you're looking at you know node or something and you want to do something like this like show
00:13:39
me the whole stack of what node was each of the ways up that is one way you can easily do it in remedy and it will work another thing you can do in remedy bg lets you do some things in the debugger
00:13:53
that normally you would think you would have to write an extension to a debugger to actually use in something like visual studio here is an example where i have a set of assets there is an asset holder
00:14:05
basically that just has an array of assets you can see here that i can look at the first one and of course there's an asset count in there as well so if i just do assets asset count you can see that i get the standard view that i
00:14:16
would normally get and that view is fairly useless to me because there's just a ton of data in here so honestly if i'm not looking at a specific thing at any given time there's really not a whole lot that i'm going to do with this particular way of viewing things that
00:14:29
helps me at a glance so one of the things that remedy bg has recently added that's kind of amazing is you can now do tabular displays of your data where if you have an array listing like this you can actually tell it to make a columnar
00:14:41
display with only specific things for example let's suppose in here that the thing that i mostly care about is the state of the asset and what type of asset it actually is maybe inside the hha type here for example and the state
00:14:55
here so one that's actually too deep and one that's only one deep what i can do is say i want a columnar display which you can do by appending braces here and i can list separated by semicolons the things i want i just use dollar sign as
00:15:08
the particular element that is currently being displayed in the array and then i can use the dot syntax to just access something off of it so in this case let's say dot hha dot type so that's like hha type just accessing the struct
00:15:20
and then i also want dot state so those are the two things that i wanted to list when i hit return you'll see that it transforms this part of the watch window into a really nice columnar display that
00:15:31
shows me all of those values listed in an easy to use spreadsheet on the side now i can also go one step further and say i'm going to use this a lot like maybe i want this to be something i'm going to do a whole bunch of debugging
00:15:45
of the things that are in this table so i want to actually make it easier for me to read i can do that by introducing column titles that i can say specifically what they are so you can see here i've now said type and state
00:15:57
and also maybe i want to make these things even easier to read in this case those happen to be enumerated values that are not actually recorded as enums in the actual struct so remedy doesn't know what they are but
00:16:08
i can even inside the syntax cast things so if i want to say cast that to an hc asset type which i know that it is so it's easier to read i can do that right in the syntax just like i would do for any other watch value same with the
00:16:22
state i happen to know that's an asset state value that wasn't marked up in the actual struct no problem remedy allows me to mark it up right at the time when i do the columnar listing so again i don't have to worry if the original code had that information in it i can just
00:16:34
add that information after the fact now this is kind of amazing i now have an asset table that says what all the assets are in the system and what their state is i can also do some other things like for example i can add a column that
00:16:48
is the index so if i want to here i can actually put one that is is the actual index of the asset so if i want to know which asset i'm looking at knowing its asset 31 in the table i can get that piece of information too so this is
00:17:01
incredibly powerful as it actually is but in remedy you can even take this an additional step further like we saw with things like strings you can always pop out a complex watch window value into
00:17:13
something you can actually dock or drag around so i can take this asset table and actually make it a permanent docking asset table that i can look at all the time however one of the things that you'll notice is this stops working very
00:17:26
quickly if i step out of scope because now that expression doesn't actually evaluate anything but as we saw we actually have features in remedy already that allow me to permanently look at
00:17:38
things if i can say how you might find them in a scope and so what i can actually do now is put these two things together i can actually combine the power of the dynamic scoping stuff that's in remedy with the power of the tablet display to get the best of both
00:17:51
worlds the asset structure is always stored off of the game state if i say hey remedy go find in the enclosing scope a game state whichever the first one is that you find get the asset table
00:18:03
off of that if i do that then i can actually write this expression in a way that anytime i'm in any code that was called from somewhere that knew about a game state it can pull the asset table
00:18:16
out of that dynamically i can then lock that as one of my watch windows and now no matter where i am in the game or what functions i happen to step into my asset table is just right there on the side
00:18:29
dynamically updated in real time for me at all times and i can scroll through it just like i would if it was some kind of custom extension that i'd written but instead of having to go through all the trouble of compiling and building a custom extension instead i just use this
00:18:43
column syntax wow slicing things out in any way putting them into a table and having it find it automatically no matter where i am this works across runs so if i actually just step back into the
00:18:55
game here this is a completely new run of the game so the asset table is going to be completely different location if i just start running the game and i break somewhere as soon as i hit my code it finds the asset table again
00:19:07
total magic if you thought that looked like the kind of debugger that you want to use every day just go to remedybg.itch.io and you can buy it there and like i said it downloads and
00:19:18
installs trivially it is literally just a zip file with an executable in it you can put somewhere on your hard drive and that is the end of it highly recommended and this was not a paid placement or an
00:19:30
advertisement or anything i literally just did this because i love this debugger and i want to see it continue being developed so i wanted more people to know about it and also i just kind of want people to know there's an option
00:19:43
out there for a really fast convenient debugger they can use on windows in case they are getting bogged down by visual studio like i used to be they want to use remedy bg for sure so check it out
00:19:55
and i hope you like it as much as i do
End of transcript