473,756 Members | 2,117 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
Nov 17 '05 #1
5 1931
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

Nov 17 '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

Nov 17 '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

Nov 17 '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


Nov 17 '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

Nov 17 '05 #6

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

Similar topics

11
2074
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
5
1874
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
16
10093
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?
18
2965
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
5
2282
by: Bob Altman | last post by:
Hi all, I have a WinForms app that has no main window (just a module with a Sub Main). My Main routine calls a subroutine that wants to politely abort the application rather than return to its caller. How can I do this? I tried Application.Exit but that doesn't terminate my application.
0
1772
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
9715
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
3423
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
1761
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
10046
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9857
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9722
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...
1
7259
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
5155
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5318
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3817
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
3369
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2677
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.