# Writing a Debugger From Scratch - DbgRs Part 2 - Register State and Stepping

DevFeed: [Writing a Debugger From Scratch - DbgRs Part 2 - Register State and Stepping](<https://devfeed.tech/articles/writing-a-debugger-from-scratch-dbgrs-part-2-register-state-and-stepping-39734.md>)

Original publisher: [Read original article](<https://www.timdbg.com/posts/writing-a-debugger-from-scratch-part-2/>)

Author: Tim Misiak

Published: 2023-03-06T16:44:39Z

Content type: tutorial

Language: en

Sources: [TimDbg](<https://devfeed.tech/sources/timdbg.md>)

Topics: [debug](<https://devfeed.tech/topics/debug.md>), [Processes](<https://devfeed.tech/topics/processes.md>), [Windows](<https://devfeed.tech/topics/windows.md>), [Code](<https://devfeed.tech/topics/code.md>), [Parsing](<https://devfeed.tech/topics/parsing.md>), [Rust](<https://devfeed.tech/topics/rust.md>), [GitHub](<https://devfeed.tech/topics/github.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [commands](<https://devfeed.tech/tags/commands.md>), [console](<https://devfeed.tech/tags/console.md>), [context](<https://devfeed.tech/tags/context.md>), [debugger](<https://devfeed.tech/tags/debugger.md>), [error-handling](<https://devfeed.tech/tags/error-handling.md>), [execution](<https://devfeed.tech/tags/execution.md>), [github](<https://devfeed.tech/tags/github.md>), [input](<https://devfeed.tech/tags/input.md>), [parsing](<https://devfeed.tech/tags/parsing.md>), [state](<https://devfeed.tech/tags/state.md>), [windows](<https://devfeed.tech/tags/windows.md>)

## AI overview

Part 2 of a tutorial on building a debugger from scratch in Rust for Windows. It adds a console command interface, input parsing, register-state reading through GetThreadContext, and basic execution control such as stepping and continuing.

## Source excerpt

When we left off last time, we had a basic "debugger" that could launch a Windows process and monitor events that occur in that process, but it's not yet something that you would really call a debugger. Two things that are missing are the ability to examine the state of the process and to control its execution. So that's what we're going to build next. The code for this part is on GitHub as the part2 branch.