472,794 Members | 3,644 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,794 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
Jul 21 '05 #1
5 1813
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

Jul 21 '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

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***@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

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******@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


Jul 21 '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

Jul 21 '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 _________________________________________________________________...
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...
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...
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...
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...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.