473,396 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to attach an exe to the debugger?

In Vs2005, I need to be able to single step through the application events
unhandledexception event. Just putting a breakpoint on a line of code in
there does not work because running the app in debug mode the unhandled
exception I throw for testing gets intercepted by the VS2005 IDE. Someone
suggested running the exe and attaching it to the debugger, but I can't seem
to find out how to do that.

Can anyone tell me how its possible to debug code in the application events
unhandledexception event. Exactly what are the steps needed to be able to do
that. I can't find any info on this in the docs.
Has anyone managed to do this before?

Any help would be greatly appreciated.
Bob

Nov 18 '06 #1
4 2666
"rdufour" <bd*****@sgiims.comschrieb:
In Vs2005, I need to be able to single step through the application events
unhandledexception event. Just putting a breakpoint on a line of code in
there does not work because running the app in debug mode the unhandled
exception I throw for testing gets intercepted by the VS2005 IDE.
Check out "Debug" -"Exceptions...". You can configure how the IDE should
behave if an exception occurs there.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 18 '06 #2
Herfried could you please be more specific, I looked at that but I really
can't figure what setting to change.
I tried unchecking enable exception assistant, but then my app just quits on
unhandled exception which is not what I need. I also tried unchecking the
common language runtime exceptions, the app just terminates, there just
seems to be no way to get to a breakpoint in the unhandledexception event in
the applicationevents in Vs2005.
If anyone managed to do this I would really appreciate knowing how.

Bob
d K. Wagner [MVP]" <hi***************@gmx.atwrote in message
news:Ou**************@TK2MSFTNGP04.phx.gbl...
"rdufour" <bd*****@sgiims.comschrieb:
>In Vs2005, I need to be able to single step through the application
events unhandledexception event. Just putting a breakpoint on a line of
code in there does not work because running the app in debug mode the
unhandled exception I throw for testing gets intercepted by the VS2005
IDE.

Check out "Debug" -"Exceptions...". You can configure how the IDE
should behave if an exception occurs there.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 19 '06 #3
rdufour wrote:
exception I throw for testing gets intercepted by the VS2005 IDE. Someone
suggested running the exe and attaching it to the debugger, but I can't seem
to find out how to do that.
Run your .EXE. In VS, choose Tools->Attach To Process. Select your
..exe from the list. Your breakpoints should now be hit.

If your exception occurs before you can attach the debugger, you might
have to put a Thread.Sleep or some other pause at the very beginning of
the code so that you have time to attach the debugger.

Nov 20 '06 #4
Thanks,
Bob
"Chris Dunaway" <du******@gmail.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
rdufour wrote:
>exception I throw for testing gets intercepted by the VS2005 IDE. Someone
suggested running the exe and attaching it to the debugger, but I can't
seem
to find out how to do that.

Run your .EXE. In VS, choose Tools->Attach To Process. Select your
.exe from the list. Your breakpoints should now be hit.

If your exception occurs before you can attach the debugger, you might
have to put a Thread.Sleep or some other pause at the very beginning of
the code so that you have time to attach the debugger.

Nov 20 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ramesh K | last post by:
Hi All, During Attach to a process like DLLHOST ,DLLHOST has FILE references to the system dlls like " odbc32.dll etc..(One can observer this in process explorer tool of Sysinternals.com by...
0
by: Peter Strřiman | last post by:
Hi I have a windows 2003 test server. I installed a web application on it, including the debug symbol files. I also installed the remote debugger from the Visual Studio 2003 DVD. My client is...
0
by: sirpelidor | last post by:
Hi, I'm a newbie to asp.net world whom just got myself a VS.net 2003 (yay). There are alot of things I don't understand so please bare with me: 1) I made a simple aspx page with cs code-behind,...
4
by: John A. Bailo | last post by:
I am debugging a windows service that consumes a web service. I set breakpoints in both. Sometimes, after attaching to the windows service, the debugger will auto-attach and run to my...
1
by: SenthilVel | last post by:
Hi I have a question when debugging dotnet code when attaching vb6.exe code to this process. i get an error like : unable to attach the process. there is no managed code running in the...
5
by: Kees de Winter | last post by:
Is it possible to attach the VS2005 debugger to an already running, and published website? If I choose "Attach to process" from the menu and then select the right process, set breakpoints, run the...
0
by: Samuel R. Neff | last post by:
How can I attach the active debugger to a newly launched process? For example, what goes in the if statement in the following code: Process process = new Process();...
2
by: Les Caudle | last post by:
Is there a way to attach to a process of a .NET app not started in debug mode? I'm having a problem with an app on a remote server, with a 3rd party .net object I dont' have source files for...
6
by: GaryDean | last post by:
I see some references on debugging by attaching to a process. There are MSDN articles that show how to attach to a process for debugging. However, I can find no info on how exactly to get the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.