0

I'm trying to debug an executable (.exe) using Visual-Studio (2019). I opened a new solution and added a command contains the path of my exe, as describes in here How do I attach Visual Studio to a process that is not started yet?.

Because of I'm interesting at the first instructions it executes, I want to set a data breakpoint /breakpoint in a specific adress that I've found on the disass window .

when running the solution and hitting the 'Break all' option, I could view the disassembly window, and then I've found the location that I want to break at. When I placed there a breakpoint and restarted, it seemed that the breakpoint was marked off.

How can I achieve that?

Here is what I've tryed so far:

  • Playing around with the Debugger type window (Solution => properties => debugging => Debugging type)

  • Open a new solutio, and try it there

Any help would be much appreciated!

1 Answers1

0

You can open the exe in VS like you would a project/solution. From the VS menu use File->Open Project/Solution and select the .exe file you want to debug. This will create an 'exe project'. You can launch it with F5, to pause on the 'first' statement you can launch with F10 instead. Then when you set breakpoints if you save the solution they should be persisted for when you next launch the exe. You'll need symbols and source for the exe if you're to make much sense of when you debug though.

Andy Sterland
  • 1,872
  • 1
  • 14
  • 19