---
title: "Using the Debugger"
url: "https://courses.osherove.com/courses/automating-all-the-things-with-finalbuilder/using-the-debugger.md"
canonical: "https://courses.osherove.com/courses/automating-all-the-things-with-finalbuilder/using-the-debugger/"
tags: []
author: "Roy Osherove"
description: "Lesson 7 of 18 in Automating All the Things with FinalBuilder (Iterations and Variables), 2:59. Free video by Roy Osherove."
usage: "Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page)."
license: "https://creativecommons.org/licenses/by/4.0/"
---

# Using the Debugger

1. [Courses](https://courses.osherove.com/#courses)
2. [Automating All the Things with FinalBuilder](https://courses.osherove.com/courses/automating-all-the-things-with-finalbuilder/)
3. Iterations and Variables

Lesson 7 of 18

Duration: 2:59 [Watch on YouTube](https://www.youtube.com/watch?v=sTU25fbSktQ)

## In this lesson

Roy Osherove puts a break point inside the iteration and, in the stopped state, adds watches for the variable that collects the inputs, the full path and the current input file name. He steps through the actions with F10 and watches the values change, which makes complicated scripts easier to debug.

## Transcript

431 words

[\[00:02\]](https://www.youtube.com/watch?v=sTU25fbSktQ&t=2s) Let's look at a simple example of debugging for something like this. I want to show some of the features of the simple debugger which is still pretty cool. So let's say that we have a problem where we're not appending things correctly or anything. We can put break points inside iterations. For example, here I can just click here, put a break point here and actually just start running. Now, the first time it gets to the break point, now I'm actually in a stopped state. And now I can go down here into the watch window.

[\[00:33\]](https://www.youtube.com/watch?v=sTU25fbSktQ&t=33s) And now I can add a watch. And that watch could be any of the parameters. For example, I can look for the V all inputs. And I can see that it doesn't have a current value. And I can let's say add watch for the full path. Let's say where are you? Full path of generation

[\[01:04\]](https://www.youtube.com/watch?v=sTU25fbSktQ&t=64s) And generation directory. We can add both of these. You can see this is the full path and generation directory. And let's add another. We'll call it the temp the temp input file name just so we can see how things are going. So we're actually going through this file right now. Now I can actually continue onwards off to the next stage. I can step through. So I can press F10 or just click here.

[\[01:36\]](https://www.youtube.com/watch?v=sTU25fbSktQ&t=96s) And now the value of V all input you see it became green for a second is this value. So I can step forward and you can see things turn change here slowly but surely. So I can see the previous value previous value two when there is one and now I have this is the previous value one. So this is the current value. Sorry, this is the current value.

[\[02:06\]](https://www.youtube.com/watch?v=sTU25fbSktQ&t=126s) This is the one just before it. This is the one just before it. Okay. So we're looking at this file, but we used to have this file and that one just before it. And we can step through again append. And we can see that the current value is now different. I can click it. I can see the current value and the new value which contains the two sentences. So this is pretty good. If you're doing complicated stuff, this is this is the part where things become easier to debug.

[\[02:41\]](https://www.youtube.com/watch?v=sTU25fbSktQ&t=161s) So I can just step on through. You can see how things keep changing. The input file name keeps changing etc. Let's see. You can see V all inputs changes again. And now we're basically done.

[Previous lesson Fixing the Empty Line - Appending To Variables](https://courses.osherove.com/courses/automating-all-the-things-with-finalbuilder/fixing-the-empty-line-appending-to-variables/) [Next lesson Downloading a Web Page & Using Literal Variables](https://courses.osherove.com/courses/automating-all-the-things-with-finalbuilder/downloading-a-web-page-and-using-literal-variables/)


---

## About the author

**Roy Osherove**: Senior Solutions Architect at AWS working on AI for production and AI-driven development; author of The Art of Unit Testing and Elastic Leadership, with about 20 years of consulting and training on unit testing, TDD, team leadership and continuous delivery.

### Sites

- [RobotPaper](https://robotpaper.ai/): This blog: AI patterns and anti-patterns, AI and coding agents, and engineering leadership.
- [osherove.com](https://osherove.com): Roy's personal site. Author of The Art of Unit Testing and Elastic Leadership; consulting and training on unit testing, TDD, team leadership and continuous delivery, plus about 20 years of blog posts.
- [The Art of Unit Testing](https://www.artofunittesting.com): The Art of Unit Testing, 3rd Edition (Manning): readable, maintainable, trustworthy unit tests, plus TDD workshops in C#, JavaScript, Java and Kotlin.
- [5whys.com](https://www.5whys.com): Roy's writing on software team leadership: self-organizing teams, surviving chaos, learning mode and the Elastic Leadership model.
- [Pipeline Driven](https://pipelinedriven.org): Continuous delivery and DevOps practices: build patterns, pipeline-friendly testing, DevOps metrics and enterprise DevOps.
- [Elastic Leadership](https://www.elasticleadership.com): Elastic Leadership, Roy's framework for software team leaders (survival, learning and self-organizing modes).

### Social

- X: https://x.com/royosherove
- LinkedIn: https://www.linkedin.com/in/osherove/

### Contact

- Contact form: https://forms.gle/jQSx5KoXvrVA1JCK7

### License

Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page). License: https://creativecommons.org/licenses/by/4.0/
