PC Review


Reply
Thread Tools Rate Thread

Debugger doesn't stop running when application exits

 
 
=?Utf-8?B?QnJlbnQgTGFuZw==?=
Guest
Posts: n/a
 
      1st Mar 2004
Hello.

I am writing a PocketPC 2002 app using C# and Visual Studio .NET 2003. I have disabled "Smart Minimize" by setting my MinimizeBox property to false.

When I click the "OK" button, I am trapping the Closed event for my form. When I step through, after the form closed event, my code returns from Applicaton.Run() and leaves the Main function. If I then look on my PocketPC device at the running programs, my application is NOT listed. However, then Visual Studio .NET 2003 debugger does not stop running. I am forced to hit the "Stop" button. This then causes the machine to "hold open" the EXE that it makes, so if I want to deploy the project again to the device, I have to shut down my IDE and do it again. This is unacceptable

I have downloaded a sample application (the Serial Communications Sample) from Microsoft and I am setting up my project and Main form the same way the sample does (as far as I can tell), but in their sample, when the OK button is pressed, the application AND the debugger stop. This is the behavior I require

Can anyone make suggestions? If you need more info, please let me know and I will get it for you. Thanks in advance!
 
Reply With Quote
 
 
 
 
Chris Tacke, eMVP
Guest
Posts: n/a
 
      1st Mar 2004
Something in the App is still running. Are you launching any threads?
Calling Application.Exit() in the Form.Close() event will take care of the
problem.

--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
Windows CE Product Manager
Applied Data Systems
www.applieddata.net


"Brent Lang" <(E-Mail Removed)> wrote in message
news:487F6A57-5C85-4BE1-9BA8-(E-Mail Removed)...
> Hello.
>
> I am writing a PocketPC 2002 app using C# and Visual Studio .NET 2003. I

have disabled "Smart Minimize" by setting my MinimizeBox property to false.
>
> When I click the "OK" button, I am trapping the Closed event for my form.

When I step through, after the form closed event, my code returns from
Applicaton.Run() and leaves the Main function. If I then look on my
PocketPC device at the running programs, my application is NOT listed.
However, then Visual Studio .NET 2003 debugger does not stop running. I am
forced to hit the "Stop" button. This then causes the machine to "hold
open" the EXE that it makes, so if I want to deploy the project again to the
device, I have to shut down my IDE and do it again. This is unacceptable.
>
> I have downloaded a sample application (the Serial Communications Sample)

from Microsoft and I am setting up my project and Main form the same way the
sample does (as far as I can tell), but in their sample, when the OK button
is pressed, the application AND the debugger stop. This is the behavior I
require.
>
> Can anyone make suggestions? If you need more info, please let me know

and I will get it for you. Thanks in advance!


 
Reply With Quote
 
=?Utf-8?B?QnJlbnQgTGFuZw==?=
Guest
Posts: n/a
 
      1st Mar 2004
Thank you, that worked

Since I am using Microsoft's same Serial class, there are other threads running. However, I did try commenting out all references to the class trying to avoid the threads from spawning. I did add that call to Applicaton.Exit where you suggested and it worked. Thank you
 
Reply With Quote
 
Chris Tacke, eMVP
Guest
Posts: n/a
 
      1st Mar 2004
Just FYI, the MSDN Serial sample code is a bit dated. We've made some mods
and significant bug-fixes since it was published, so getting the latest may
be a good idea.

www.opennetcf.org

--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
Windows CE Product Manager
Applied Data Systems
www.applieddata.net


"Brent Lang" <(E-Mail Removed)> wrote in message
news:0400DBB1-3B85-479E-BD34-(E-Mail Removed)...
> Thank you, that worked.
>
> Since I am using Microsoft's same Serial class, there are other threads

running. However, I did try commenting out all references to the class
trying to avoid the threads from spawning. I did add that call to
Applicaton.Exit where you suggested and it worked. Thank you


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Debugger doesn't stop at break points Curious Microsoft Dot NET 0 9th Nov 2007 09:47 PM
how can i stop from running my word application in win xp pro =?Utf-8?B?YW5kZXJzb24=?= Microsoft Access 2 14th May 2006 06:51 PM
Root URL/ Application path problem with running debugger =?Utf-8?B?YW55ZW9uZQ==?= Microsoft ASP .NET 2 6th Jan 2006 09:32 PM
Task Scheduler Doesn't Stop RUNNING robboll Microsoft Windows 2000 2 21st Oct 2005 12:39 AM
Managed C++ application doesn't startup but jumps to debugger instead... Help ! =?Utf-8?B?THVpc01pZ3VlbEh1YXBheWE=?= Microsoft Dot NET 1 5th Apr 2004 05:36 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:45 PM.