I am using Visual Studio, developing a native application, I have a programmatical breakpoint (assert) in my code placed using __asm int 3 or __debugbreak. Sometimes when I hit it, I would like to disable it so that successive hits in the same debugging session no longer break into the debugger. How can I do this?
相关问题
- How to know full paths to DLL's from .csproj f
- Importing NuGet references through a local project
- Visual Studio 2019 - error MSB8020: The build tool
- 'System.Threading.ThreadAbortException' in
- Pass custom debug information to Microsoft bot fra
相关文章
- How to show location of errors, references to memb
- How to track MongoDB requests from a console appli
- Visual Studio Hangs on Loading UI Library
- How to use Mercurial from Visual Studio 2010?
- How do I get to see DbgPrint output from my kernel
- Copy different file to output directory for releas
- Edit & Continue doesn't work
- Is it possible to run 16 bit code in an operating
You might try something like this:
This should hit the debug only once. You might even show a messagebox to the user and ask what to do: continue (nothing happens), break (int 3 is called) or ignore (ignore is set to true, the breakpoint is never hit again)
x86 / x64
Assuming you are writing x86/x64 application, write following in your watch window:
x86:
*(char *)eip,x
x64:
*(char *)rip,x
You should see a value 0xcc, which is opcode for INT 3. Replace it with 0x90, which is opcode for NOP. You can also use the memory window with eip as an address.
PPC
Assuming you are writing PPC application (e.g. Xbox 360), write following in your watch window:
*(int *)iar,x
You should see a value 0xfeNNNNNN, which is opcode for trap (most often 0x0fe00016 = unconditional trap). Replace it with 0x60000000, which is opcode for NOP.