Overview and Introduction to RemedyBG Debugger

Jul 7, 2024

Overview and Introduction to RemedyBG Debugger

Presenter: Jason

Introduction

  • RemedyBG is a 64-bit Windows debugger, an alternative to Visual Studio.
  • Created by a single developer; available for $30 at remedybg.itch.io.
  • Simplified installation: just place the .exe file in your desired directory.

Setup and Installation

  • Download the latest version (3.9.4) and place the .exe in your chosen folder, e.g., C:\RemedyBG.
  • Simple and quick setup compared to Visual Studio.

Using RemedyBG

  1. Launching the Application: Open RemedyBG via Command Line.
    • Ensure RemedyBG is in your path environment variable.
  2. Setting Up a Debugging Session: Configure the Session Tab.
    • Set the command (path to the executable), e.g., ./bin/main.exe.
    • Open the source file to debug and set breakpoints.
    • Save your session as .rbg file for later use.
  3. Entry Point Function Settings: Choose entry points like main or WinMain.
    • Use either default entry points or define custom entry points.
  4. Environment Variables: Configure variables if needed.
    • Example: Disable debug heap to improve performance.

Debugging Basics

  • Build Configuration: Ensure correct compiler and linker flags.
    • Use -Zi for creating PDB files.
    • Ensure JMC is disabled and use debug:full instead of debug:fastlink.
  • Watch Window: Use C99 expressions to monitor variable values.
    • Examples: Casting, arithmetic operations.

Format Specifiers

  • Variable Formats: View variables in binary, hexadecimal, etc.
    • Example: var, B for binary, var, x for hexadecimal.
  • Array Display: Specify how many elements to display and their format.
    • Example: array, 4x to show four elements in hexadecimal.

Advanced Features

  1. Viewing Registers: Monitor register values like RAX.
  2. Relative Scopes: Access variables from higher scopes using [*].
    • Example: [*]var to access a variable one level up in the call stack.
  3. Locking Scope: Lock viewing of a variable’s scope to persist its value.
    • Example: Lock var and step through functions without losing the value.
  4. Matrix Format Specifier: Display matrices in a traditional row/column format.
    • Example: matrix.elements, mtx4 for a 4x4 matrix.
  5. Table Format Specifier: Display arrays as tables with named columns.
    • Example: array[index], width, height displays rectangles' dimensions.

Breakpoints

  1. Conditional Breakpoints: Stop execution only if a condition is met.
    • Example: if var == 3223.
  2. Function Breakpoints: Break on a specific function call (e.g., addFunc).
  3. Processor Breakpoints: CPU-level breakpoints for read/write execution.
  4. Auto-Enabling Breakpoints: Enable a child breakpoint when a parent is hit.
    • Example: Enable process() breakpoint only when special_trigger is set.

Additional Tips

  • Access help documentation via F1 or the Help menu.
  • Extensive use of variables like TID, PID, locals, and params for debugging.
  • Benefit from community support in the Handmade Network Discord channel.

Conclusion

  • RemedyBG offers a streamlined alternative to Visual Studio.
  • Focuses on being lightweight and efficient.
  • Community and developer support available on Discord.
  • Suitable for developers looking to move away from Microsoft's ecosystem.