Hello, How can I catch an error in devenv? If an error occures (the build fails..) I need to print it out. How can I do that? Thanks!
A:
If it really is an exception then you can open a second Visual Studio process and use it to debug the first VS process.
- Open up the first Visual Studio (the one that will have an exception)
- Open up another instance of VS and go to Tools / Attach to Process
- Select the only available devenv.exe in the list (the "current" devenv.exe will be grayed out or unavailable, so don't worry about selecting the wrong one)
- Click Attach
- Go to Debug / Exceptions and click all the checkboxes so that they are all enabled (there should be 10 checkboxes)
- Go back to the first VS and reproduce the error
Hopefully the second VS will stop when the error occurs. They you can try to use the Autos window and see what's going on.
Of course, all this depends on exactly what kind of error it is, which we're not really clear on just yet.
Eilon
2010-01-06 01:34:21