1

I'm using the x64dbg debugger from SourceForge under Windows 10, and I've been having a problem with it that I think is probably due to my own stupidity somehow, but so far I can't pin it down.

I'm using the MASM assembler, and when I'm working on a problem I will typically write a program consisting of only a few instructions, and then trace it with debugger to see exactly what's happening in a simple context.

I've been using a program called temp1 for a few weeks, and now suddenly when I run this program with the debugger, the debug data flashes for a fraction of a second on the x64dbg screen, and then the program runs to completion, as if I had clicked Debug → Run with no breakpoints.

I tried adding more instructions to the program, but the result was still the same. So then I renamed the program to bozo, and assembled and linked it under that name, with only two instructions in it. When I run bozo.exe under x64dbg, it stops on the first instruction with no problem.

What could be going on here? How can just using a different program name change the way the debugger behaves?

MarianD
  • 13,096
  • 12
  • 42
  • 54
  • Evidently there are few if any x64dbg users out there. Is there a better debugger that I could be using instead under Windows 10? – Robert Watson Jul 12 '20 at 16:17

2 Answers2

2

Go to Options → Preferences (Settings), and in the Events tab make sure to have entry breakpoint selected, so x64dbg breaks at the entry of your program, before it does anything.

MarianD
  • 13,096
  • 12
  • 42
  • 54
Alicia
  • 143
  • 11
0

x64dbg saves settings, breakpoints, comments, etc. on the debugee file name basis - in the so-called "database".

For example, if your debugee was bozo.exe 64-bit executable, its database is saved in the bozo.exe.dd64 file to keep your setting for future work with the same (bozo.exe) file.

The full path is something as

c:\Program Files\x64dbg\x64\db\bozo.exe.dd64

but it is not important as it is loaded automatically after opening / attaching the debugee bozo.exe.

It explains why the simple file-name change (which creates a new database with the default settings) may change the behavior of the debugger.

(The rest of the explanation is in the Alicia's answer.)

MarianD
  • 13,096
  • 12
  • 42
  • 54