Debugging a process thats gets restarted automatically

Sysprogs forums Forums VisualGDB Debugging a process thats gets restarted automatically

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #9820
    BitFlipper
    Participant

    Hi,

    I know there probably is not going to be a simple answer for this, but…

    I have a situation where I need to debug a process that, as part of our automated testing, simulates the process being crashed, after which our watchdog will restart it. However at some point after the process has been restarted during one of these times, it hits a bug. To debug this, I need to really be able to step through this part of the code. However GDB isn’t attached at that point obviously.

    So I’m wondering, what would be the best way to be able to use VGDB to debug this? Any suggestions?

    Thanks in advance for any help with this.

    #9822
    support
    Keymaster

    Hi,

    This is a tough one. You can use custom actions to select a specific process (or wait for it to start) once you hit F5 in Visual Studio, but automatically attaching to each new process is something beyond VisualGDB capabilities. We would advise instead configuring your system to create crash dumps when the process crashes or programmatically running an infinite loop if a crash is detected so that you have time to attach manually.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.