473,714 Members | 2,623 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Debugger.Break( ) and Abort/Retry/Ignore

On running a console app from Windows Server 2003 with Debugger.Break( )
makes an Abort Retry Ignore popup appear stating that a user defined
breakpoint is reached.

Works the same in both Release and Debug Builds.

How to avoid this ?

Thank You
rawCoder
Jul 21 '05 #1
5 1870
Hi,

Debugger.Break will attach a debugger to the app. If you dont want
it to go attach a debugger in release mode try this.

#If Debug Then

Debugger.Break( )

#End If

Ken

------------------------

"rawCoder" <ra******@hotma il.com> wrote in message
news:OH******** ******@TK2MSFTN GP09.phx.gbl...
On running a console app from Windows Server 2003 with Debugger.Break( )
makes an Abort Retry Ignore popup appear stating that a user defined
breakpoint is reached.

Works the same in both Release and Debug Builds.

How to avoid this ?

Thank You
rawCoder

Jul 21 '05 #2
Assuming C# is the issue

#if DEBUG
Debugger.Break( );
#endif

is the correct version

"Ken Tucker [MVP]" <vb***@bellsout h.net> wrote in message
news:OQ******** ******@TK2MSFTN GP12.phx.gbl...
Hi,

Debugger.Break will attach a debugger to the app. If you dont want it to go attach a debugger in release mode try this.

#If Debug Then

Debugger.Break( )

#End If

Ken

------------------------

"rawCoder" <ra******@hotma il.com> wrote in message
news:OH******** ******@TK2MSFTN GP09.phx.gbl...
On running a console app from Windows Server 2003 with Debugger.Break( )
makes an Abort Retry Ignore popup appear stating that a user defined
breakpoint is reached.

Works the same in both Release and Debug Builds.

How to avoid this ?

Thank You
rawCoder

Jul 21 '05 #3
No actually I would like that even if its a Debug version, the Debugger
Breaks in the IDE, BUT does nothing when its being run standalone as an
executable.

Seems like that is not possible, right ?

Thank You
rawCoder

"Ken Tucker [MVP]" <vb***@bellsout h.net> wrote in message
news:OQ******** ******@TK2MSFTN GP12.phx.gbl...
Hi,

Debugger.Break will attach a debugger to the app. If you dont want it to go attach a debugger in release mode try this.

#If Debug Then

Debugger.Break( )

#End If

Ken

------------------------

"rawCoder" <ra******@hotma il.com> wrote in message
news:OH******** ******@TK2MSFTN GP09.phx.gbl...
On running a console app from Windows Server 2003 with Debugger.Break( )
makes an Abort Retry Ignore popup appear stating that a user defined
breakpoint is reached.

Works the same in both Release and Debug Builds.

How to avoid this ?

Thank You
rawCoder

Jul 21 '05 #4
It depends on what IDE you are using.
If you are using VS.NET, you can add breakpoint in the editor instead of
placing Debugger.Break( ) directly into code (add breakpoint by clicking on
the left side of the editor) and the execution will break only when run from
your application VS.NET.

"rawCoder" <ra******@hotma il.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
No actually I would like that even if its a Debug version, the Debugger
Breaks in the IDE, BUT does nothing when its being run standalone as an
executable.

Seems like that is not possible, right ?

Thank You
rawCoder

"Ken Tucker [MVP]" <vb***@bellsout h.net> wrote in message
news:OQ******** ******@TK2MSFTN GP12.phx.gbl...
Hi,

Debugger.Break will attach a debugger to the app. If you dont

want
it to go attach a debugger in release mode try this.

#If Debug Then

Debugger.Break( )

#End If

Ken

------------------------

"rawCoder" <ra******@hotma il.com> wrote in message
news:OH******** ******@TK2MSFTN GP09.phx.gbl...
On running a console app from Windows Server 2003 with Debugger.Break( )
makes an Abort Retry Ignore popup appear stating that a user defined
breakpoint is reached.

Works the same in both Release and Debug Builds.

How to avoid this ?

Thank You
rawCoder


Jul 21 '05 #5
Browsing through VS2005B2 i found the exact solution to my problem

If Debugger.IsAtta ched() then Debugger.Break( )

Will break only if its being run from IDE and will do nothing if standalsone
executable is being run.

HTH
rawCoder

"rawCoder" <ra******@hotma il.com> wrote in message
news:OH******** ******@TK2MSFTN GP09.phx.gbl...
On running a console app from Windows Server 2003 with Debugger.Break( )
makes an Abort Retry Ignore popup appear stating that a user defined
breakpoint is reached.

Works the same in both Release and Debug Builds.

How to avoid this ?

Thank You
rawCoder

Jul 21 '05 #6

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

Similar topics

11
2069
by: Ziaran _ | last post by:
I have written a new debugger. I think people will find it useful. Where can I post it for people to download? Thanks, Nir _________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail
16
10082
by: Bill | last post by:
Say I have a childThread currently is running a finally block to cleanup external resources. At the same time the main thread calls childThread.Abort(). The question is: when the ThreadAbortException is thrown, does the childThread finish the remaining code in the finally block?
5
1928
by: rawCoder | last post by:
On running a console app from Windows Server 2003 with Debugger.Break() makes an Abort Retry Ignore popup appear stating that a user defined breakpoint is reached. Works the same in both Release and Debug Builds. How to avoid this ? Thank You rawCoder
18
2961
by: R. Bernstein | last post by:
Okay, a bit of an exaggeration. Recently, I've been using Python more seriously, and in using the debugger I think one of the first things I noticed was that there is no "restart" ("R" in perldb) or "run" (gdb) command. I was pleasantly pleased discover how easy though it was patch pdb.py and pdb.doc; my patch for this is here: http://sourceforge.net/tracker/index.php?func=detail&aid=1393667&group_id=5470&atid=305470
0
1767
by: ajb123 | last post by:
I am encountering an R6025 ("No object has been instantiated to handle the pure virtual function call") error in a complex application. The error is intermittent and it is time consuming to reproduce. I have read that setting a breakpoint in purevirt.c at the line "_amsg_exit(_RT_PUREVIRT);" will trap the error, but when I attach to my application, the debugger does not stop. I tried to deliberately reproduce the same error in a much...
11
9713
by: O.B. | last post by:
Does C# support anything like PHP's break command that optionally accepts a parameter specifying how many loops to break out of?
3
2373
rsrinivasan
by: rsrinivasan | last post by:
Hi all, I am using the below html page. It displays a messagebox when the page is loaded. But the messagebox has 3 button abort,retry, ignore. But i want only abort and ignore button. what should i do for this? <HTML> <HEAD> <script > function window.confirmNew(str) { execScript('n = msgbox("'+str+'","164")', "vbscript");
1
3419
by: Nimral | last post by:
Hi folks, is there a smart way to develop efficiently that helps me in the following situation: a sub calls a subsub, which calls a subsubsub, and so on. Within a subsubsub an error occurs which I handle, either using on error goto / err.number, or a try... catch block. I display a msgbox (abort,retry,ignore). Implementing retry and ignore is fairly easy using a loop structure. But how about "abort"?
14
1756
by: Meganutter | last post by:
Hello, I have searched far and wide, and i found millions of post telling "BAD" or "you should have regular checks" but that wont work for me. the problem is, i have a program that is all about queries. the thread.abort function does not trigger in the middle of a query. now this is a lengthy query on a slow server, and just using timeout wont work because then i will almost never get the query. (3 out of 20 i estimate) but the impatient...
0
8707
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9174
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9015
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7953
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6634
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5947
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4725
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3158
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2520
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.