Can I attach to a program on start-up ?

Is it possible to automatically attach RemedyBG to a program as soon as the program starts ?

It's a feature that I find myself wanting somewhat often and the debugger that I currently use (Visual Studio) doesn't seem to be able to do it in any easy easy.

I'm not sure if you are talking about a program that has not been compiled with debug symbols (i.e. you don't have a debug build). In that case Im not sure it can be done.

However, if you do have a debug build, then if you just set the executable path as the command in remedbybg and hit f11 it stops at the entrypoint. But this also works in visual studio. So, again Im not sure what you are looking for.

From what I read in the README of remedybg, the way the debugger stops at the entrypoint and not before the entrypoint (which may be what you are asking) is by looking at a specific symbol in the executable itself which is added by msvc (out of my depth here). So, if you want to stop before that... maybe someone with more expertise can help you, but to me it does seem plausible at least.


Edited by Gaurav Gautam on

I figured out a way to get the Visual Studio debugger to work for me and from what you've said, it seems I should be able to get RemedyBG to work also.

Basically, I have a secondary program that my program lives within and as such I have to attach the debugger to this secondary program in order to debug my code.

Obviously I can't possibly manually attach VS to the secondary program quickly enough for the breakpoint at the start-up code to be hit, the program execution will already have executed that code long ago.

In Visual Studio, I just found out that there's a property called "Command" in the project "Configuration Properties -> Debugging" window which can be changed to the secondary programs executable and then I can use the start button in VS and it will start the secondary program with VS attached and that lets the breakpoint at the start-up code get hit.

I appreciate your help :)


Edited by Freddy on
Replying to gautam1168 (#26836)

I think I had read in the remedybg README that this is also possible in some way in remedy. I don't remember off the top of my head though.


Replying to Freddy (#26838)