473,385 Members | 1,927 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,385 software developers and data experts.

Prevent method from being debugged

Hi,

I have a utility method in one of my applications which is used
extensively across the application (and it works well). The problem is
that while debugging using Visual Studio, I sometimes forget to skip
debugging for that method (i.e. press F10 instead of F11) and I end up
debugging into that method. Is there any attribute or condition that I
can specify by which I can skip debugging into this utility function?

- Sri

Jan 5 '07 #1
4 1895

Decorate the member with
System.Diagnostics.DebuggerStepThroughAttribute.

HTH,

Sam

------------------------------------------------------------
We're hiring! B-Line Medical is seeking Mid/Sr. .NET
Developers for exciting positions in medical product
development in MD/DC. Work with a variety of technologies
in a relaxed team environment. See ads on Dice.com.

On 5 Jan 2007 11:29:18 -0800, "ramadu"
<sr******************@gmail.comwrote:
>Hi,

I have a utility method in one of my applications which is used
extensively across the application (and it works well). The problem is
that while debugging using Visual Studio, I sometimes forget to skip
debugging for that method (i.e. press F10 instead of F11) and I end up
debugging into that method. Is there any attribute or condition that I
can specify by which I can skip debugging into this utility function?

- Sri
Jan 5 '07 #2
That worked! Thanks!

-Sri

Samuel R. Neff wrote:
Decorate the member with
System.Diagnostics.DebuggerStepThroughAttribute.

HTH,

Sam

------------------------------------------------------------
We're hiring! B-Line Medical is seeking Mid/Sr. .NET
Developers for exciting positions in medical product
development in MD/DC. Work with a variety of technologies
in a relaxed team environment. See ads on Dice.com.

On 5 Jan 2007 11:29:18 -0800, "ramadu"
<sr******************@gmail.comwrote:
Hi,

I have a utility method in one of my applications which is used
extensively across the application (and it works well). The problem is
that while debugging using Visual Studio, I sometimes forget to skip
debugging for that method (i.e. press F10 instead of F11) and I end up
debugging into that method. Is there any attribute or condition that I
can specify by which I can skip debugging into this utility function?

- Sri
Jan 5 '07 #3
Hi,

ramadu wrote:
Hi,

I have a utility method in one of my applications which is used
extensively across the application (and it works well). The problem is
that while debugging using Visual Studio, I sometimes forget to skip
debugging for that method (i.e. press F10 instead of F11) and I end up
debugging into that method. Is there any attribute or condition that I
can specify by which I can skip debugging into this utility function?

- Sri
Additionally to Samuel's answer, when that happens, you can also press
the "Step out" button (Shift-F11 in default configuration). That will
take you right out of the current method.

HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Jan 5 '07 #4
I use that one alot, but I also use "DebuggerHidden" alot. The difference
(that I observe) is the interaction with Exceptions and "Break on All
exceptions". There are also some breakpoint differences.

In low level code that often gets exceptions (such as calling dispose on a
socket), I would use DebuggerHidden.

--
Chris Mullins, MCSD.NET, MCPD:Enterprise, MVP C#
http://www.coversant.net/blogs/cmullins
"Samuel R. Neff" <sa********@nomail.comwrote in message
news:vr********************************@4ax.com...
>
Decorate the member with
System.Diagnostics.DebuggerStepThroughAttribute.

HTH,

Sam

------------------------------------------------------------
We're hiring! B-Line Medical is seeking Mid/Sr. .NET
Developers for exciting positions in medical product
development in MD/DC. Work with a variety of technologies
in a relaxed team environment. See ads on Dice.com.

On 5 Jan 2007 11:29:18 -0800, "ramadu"
<sr******************@gmail.comwrote:
>>Hi,

I have a utility method in one of my applications which is used
extensively across the application (and it works well). The problem is
that while debugging using Visual Studio, I sometimes forget to skip
debugging for that method (i.e. press F10 instead of F11) and I end up
debugging into that method. Is there any attribute or condition that I
can specify by which I can skip debugging into this utility function?

- Sri

Jan 5 '07 #5

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

Similar topics

9
by: Felix Wiemann | last post by:
Sometimes (but not always) the __new__ method of one of my classes returns an *existing* instance of the class. However, when it does that, the __init__ method of the existing instance is called...
1
by: Chance | last post by:
Is there any way to do something like this... Main() { foo(); bar(); } foo() { // do something that has been debugged
2
by: anonieko | last post by:
Scenario: You have a page that is TOO slow to refresh. But it allows partial flushing of html contents. I.e. Submit button already appears but you don't want your users to click on it prematurely...
6
by: John Bowman | last post by:
Hi All, I must be missing something really obvious, so I'd appreciate someone helping me out. I have a simple Windows form that currently only has a title bar (aka the Text Property is set) and...
1
by: Mark Kamoski | last post by:
Hi-- All of sudden (?) the VS.NET v1 IDE is NOT automatically attaching aspnet_wp.exe as a debugged process. Why? Here is the situation. VS.NET (v1)
9
by: Daniel Walzenbach | last post by:
Hi I am faced with the following problem: I have a page (let’s call this page page1.aspx) containing some TextBoxes and a hyperlink which opens another page (let’s call this page page2.aspx)...
13
by: Perecli Manole | last post by:
In the forms authentication construct, I need a way to prevent ticket IssueDate and Expiration from being updated for a specific page only. By default forms authentication updates these two values...
7
by: Shadowboxer | last post by:
How do I prevent a for from being disposed of when you click the 'X' button. I'd like to override the dispose method somehow so it just does a me.hide any ideas? thanks -J
0
by: mungerer | last post by:
Whenever I am debugging a (desktop) application the Visual Studio 2005 IDE "locks" the design mode of any HTML files that I have open, even if they are not in the solution being debugged and are...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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,...

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.