Debugging a program with multiple processes in VC++ 2008 Express

clickynext

Platinum Member
Dec 24, 2004
2,583
0
0
Hey all,

I've been trying to debug this application (for a school project) that is comprised of multiple .exe files running together. So there is a parent process, and a few child processes.

When I set breakpoints in the parent process, debug works fine and the breakpoints are hit.

When I set breakpoints in the child processes and debug them alone (set them as the active project and run them separately from the parent), it also works fine.

But when I set breakpoints in the child process and run debug on the parent (which starts up the child processes), the breakpoints turn into hollow circles that say "No symbols have been loaded for this document"

Does anyone know what's happening, and perhaps how I can get it to load the symbols of all my projects at once while it's debugging?


Thanks
 

brandonb

Diamond Member
Oct 17, 2006
3,731
2
0
I believe when you build something in debug mode (C++) there is an option to turn on symbol debug info (.dbg file I believe) look in the options. When it goes into debug on the child process, if its finds the .dbg file it loads the symbols for you.

Thats one option (which I haven't done in so long)... What I typically do is just load the parent, and child projects into the same solution. The solution is a bundle of multiple projects. If you load the parent and child project into the same solution, it will work.

I'd go for option 2 if you can, but option 1 works too.

 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
13
81
www.markbetz.net
It's different depending on whether it's managed or unmanaged code. If it's managed code, then you can put an app.config file in the directory where the parent process resides, and add entries to the <debug> element to tell it what modules to load symbols for. It may also be something you can do in the project settings. Let me know if this doesn't help and I can dig a little deeper.
 

clickynext

Platinum Member
Dec 24, 2004
2,583
0
0
Thanks for the quick replies, guys

Originally posted by: brandonb
I believe when you build something in debug mode (C++) there is an option to turn on symbol debug info (.dbg file I believe) look in the options. When it goes into debug on the child process, if its finds the .dbg file it loads the symbols for you.

Thats one option (which I haven't done in so long)... What I typically do is just load the parent, and child projects into the same solution. The solution is a bundle of multiple projects. If you load the parent and child project into the same solution, it will work.

I'd go for option 2 if you can, but option 1 works too.

I actually already have the projects in the same solution since creation, so it's really strange that it's doing this.

For the first option, I didn't find any .dbg file options, but I found options->debugging->symbols where it lets you specify .pdb file locations. I tried specifying one for each of my processes, but they still weren't loaded.

It's different depending on whether it's managed or unmanaged code. If it's managed code, then you can put an app.config file in the directory where the parent process resides, and add entries to the <debug> element to tell it what modules to load symbols for. It may also be something you can do in the project settings. Let me know if this doesn't help and I can dig a little deeper.

I'm not sure if it's managed code or not. It's written in C++ in Visual C++ 2008 Express Edition, is that enough information to tell?
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
13
81
www.markbetz.net
Originally posted by: clickynext
Thanks for the quick replies, guys

Originally posted by: brandonb
I believe when you build something in debug mode (C++) there is an option to turn on symbol debug info (.dbg file I believe) look in the options. When it goes into debug on the child process, if its finds the .dbg file it loads the symbols for you.

Thats one option (which I haven't done in so long)... What I typically do is just load the parent, and child projects into the same solution. The solution is a bundle of multiple projects. If you load the parent and child project into the same solution, it will work.

I'd go for option 2 if you can, but option 1 works too.

I actually already have the projects in the same solution since creation, so it's really strange that it's doing this.

For the first option, I didn't find any .dbg file options, but I found options->debugging->symbols where it lets you specify .pdb file locations. I tried specifying one for each of my processes, but they still weren't loaded.

It's different depending on whether it's managed or unmanaged code. If it's managed code, then you can put an app.config file in the directory where the parent process resides, and add entries to the <debug> element to tell it what modules to load symbols for. It may also be something you can do in the project settings. Let me know if this doesn't help and I can dig a little deeper.

I'm not sure if it's managed code or not. It's written in C++ in Visual C++ 2008 Express Edition, is that enough information to tell?

No, because it could still be managed or unmanaged C++. Managed C++ gets translated into CIL and then JIT compiled into binary when run, like other .Net languages. Unmanaged C++ produces Win32 binary modules. If it's unmanaged then you'll need to take the advice in the first reply, and specify the additional symbols to load in the debug properties for the project.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |