开发者

Debugging a specific executable on Visual C++ 2008 Express

开发者 https://www.devze.com 2022-12-15 17:05 出处:网络
Visual C++ 2008 has a great tool called \"Attach to Process\", which start watching a specific process for debugging symbols and handles correctly your breakpoints. This is fantastic, but I would like

Visual C++ 2008 has a great tool called "Attach to Process", which start watching a specific process for debugging symbols and handles correctly your breakpoints. This is fantastic, but I would like some more.

I would like to attach my debugging se开发者_JAVA技巧ssion to a executable file, such that when it is executed, debugger takes command. So I would, say, attach my debugging session to d:\listener\solver.exe, and start an app that eventually will call this executable, and then Visual C++ would pop on the screen when it reached a breakpoint.

Is that possible? How do I do that?


There is a build in feature in windows that enables you to start a process with a debugger attached to it. I wrote about this feature on another SO Question. you can read all about it here.


Not sure how far this will get you, but if you go into task manager, look at the processes tab, you can right-click a file and choose "Debug" it will then load this file into Visual Studio.

Although, it might just load the machine code and not the actual code. But might be worth checking out.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号