How to attach to a process from a workspace and not lost the works

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

After I open a workspace I have access to all C++ files of the workspace.

I can put breakpoints. Everything look great...
So I go attach to my process and Visual C++ go close my workspace!

I don't see the goal of closing the workspace...

How can I fix this strange behavior/bug?
 
After I open a workspace I have access to all C++ files of the workspace.

I can put breakpoints. Everything look great...
So I go attach to my process and Visual C++ go close my workspace!

I don't see the goal of closing the workspace...

How can I fix this strange behavior/bug?

Set the following settings in Project properties | Configuration Properties | Debugging:

Attach = "Yes"
Command = "Your executable" (optional, for .EXE projects the default is OK)

With these settings, pressing F5 will attach to the specified executable (if it is running)
instead of launching it, and keep the workspace open.

Regards,
Oleg
 
I can make it work in Visual Studio 2003 but not with Visual C++ 6.xx. Any
fix on this one?
 
I can make it work in Visual Studio 2003 but not with Visual C++ 6.xx. Any
fix on this one?

After you have attached for the first time (and lost your workspace),
open the needed source files, set breakpoints, etc., and save the workspace
(File | Save Workspace). This will create an .OPT file associated with
the given executable.

Next time you want to debug the executable, open the .EXE file in
File | Open Workspace dialog. This will load the .OPT file created
in the previous step, and that workspace will not be closed when
you attach to the running executable.

Oleg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top