473,396 Members | 2,147 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.

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 1915
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******@hotmail.com> wrote in message
news:OH**************@TK2MSFTNGP09.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***@bellsouth.net> wrote in message
news:OQ**************@TK2MSFTNGP12.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******@hotmail.com> wrote in message
news:OH**************@TK2MSFTNGP09.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***@bellsouth.net> wrote in message
news:OQ**************@TK2MSFTNGP12.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******@hotmail.com> wrote in message
news:OH**************@TK2MSFTNGP09.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******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.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***@bellsouth.net> wrote in message
news:OQ**************@TK2MSFTNGP12.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******@hotmail.com> wrote in message
news:OH**************@TK2MSFTNGP09.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.IsAttached() 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******@hotmail.com> wrote in message
news:OH**************@TK2MSFTNGP09.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
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 _________________________________________________________________...
5
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...
16
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...
18
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...
5
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...
0
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...
11
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
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...
1
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...
14
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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
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,...
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
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.