473,657 Members | 2,832 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Debug.Assert( False, "Why wont I display ??")

Debug.Assert( False, "Why wont I display ??")

I am trying to use this in my code but it wont display. The app is running
on my local machine and the above code under a button click event.

What am I missing ?

Cheers mr N . . .
Nov 19 '05 #1
5 2464
The syntax is :

Debug.Assert Method (Boolean, String)
Checks for a condition and displays a message if the condition is false.

Example :

Public Shared Sub MyMethod(type As Type, baseType As Type)
Debug.Assert(No t (type Is Nothing), "Type parameter is null")
End Sub

What's the method/condition you're testing ?

http://msdn.microsoft.com/library/de...serttopic1.asp

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
=============== =============== ========
"Mr Newbie" <he**@now.com > wrote in message news:Or******** ******@TK2MSFTN GP15.phx.gbl...
Debug.Assert( False, "Why wont I display ??")

I am trying to use this in my code but it wont display. The app is running on my local
machine and the above code under a button click event.

What am I missing ?

Cheers mr N . . .

Nov 19 '05 #2
Yes I know, thats my example but it does not work. I'm simply trying to get
the line to work and display the dialog box on my local server if the
assertion failed, but it does naff all and simply goes about its business
without so much as a sneeze !!!
Cheers Mr N


"Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:ui******** ******@TK2MSFTN GP09.phx.gbl...
The syntax is :

Debug.Assert Method (Boolean, String)
Checks for a condition and displays a message if the condition is false.

Example :

Public Shared Sub MyMethod(type As Type, baseType As Type)
Debug.Assert(No t (type Is Nothing), "Type parameter is null")
End Sub

What's the method/condition you're testing ?

http://msdn.microsoft.com/library/de...serttopic1.asp

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
=============== =============== ========
"Mr Newbie" <he**@now.com > wrote in message
news:Or******** ******@TK2MSFTN GP15.phx.gbl...
Debug.Assert( False, "Why wont I display ??")

I am trying to use this in my code but it wont display. The app is
running on my local machine and the above code under a button click
event.

What am I missing ?

Cheers mr N . . .


Nov 19 '05 #3
"Mr Newbie" <he**@now.com > wrote in message
news:uA******** ******@TK2MSFTN GP09.phx.gbl...
Yes I know, thats my example but it does not work. I'm simply trying to
get the line to work and display the dialog box on my local server if the
assertion failed, but it does naff all and simply goes about its business
without so much as a sneeze !!!


I don't know anything about Debug.Assert, but does it only work in debug
mode, and you're not debugging?
Nov 19 '05 #4
Debug.Assert doesn't work very well for asp.net applications. You need to
check the VS.Net output window and run the code from VS.Net. Not very
practicaly. Supposedly you can do stuff to fix it, like:
http://www.vbinfozine.com/t_aspnetassert.shtml

but I've never tried.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!

"Danny Tuppeny" <gr****@dannytu ppeny.commmmmm> wrote in message
news:43******** *************** @ptn-nntp-reader03.plus.n et...
"Mr Newbie" <he**@now.com > wrote in message
news:uA******** ******@TK2MSFTN GP09.phx.gbl...
Yes I know, thats my example but it does not work. I'm simply trying to
get the line to work and display the dialog box on my local server if the
assertion failed, but it does naff all and simply goes about its business
without so much as a sneeze !!!


I don't know anything about Debug.Assert, but does it only work in debug
mode, and you're not debugging?

Nov 19 '05 #5
OK, thanks for your help Karl.

Much appreciated.
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:up******** *****@TK2MSFTNG P10.phx.gbl...
Debug.Assert doesn't work very well for asp.net applications. You need to
check the VS.Net output window and run the code from VS.Net. Not very
practicaly. Supposedly you can do stuff to fix it, like:
http://www.vbinfozine.com/t_aspnetassert.shtml

but I've never tried.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!

"Danny Tuppeny" <gr****@dannytu ppeny.commmmmm> wrote in message
news:43******** *************** @ptn-nntp-reader03.plus.n et...
"Mr Newbie" <he**@now.com > wrote in message
news:uA******** ******@TK2MSFTN GP09.phx.gbl...
Yes I know, thats my example but it does not work. I'm simply trying to
get the line to work and display the dialog box on my local server if
the assertion failed, but it does naff all and simply goes about its
business without so much as a sneeze !!!


I don't know anything about Debug.Assert, but does it only work in debug
mode, and you're not debugging?


Nov 19 '05 #6

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

Similar topics

5
2844
by: John Smith | last post by:
Sorry if this is the wrong forum... Does anyone know what the difference is between a debug build and an optimised debug build in Visual Studio 2003?
1
1651
by: John Holmes | last post by:
My application is ready to deploy and I've set debug=false in the web.config file and configured the app for release mode. When I try to run the app from the IDE, I get the following error message: "Error while trying to run project: Unable to start debuggin on the web server. The project is not configured to be debugged. Click Help for more information." I'm not sure why it won't let me run the app from Visual Studio if it's not in...
2
2736
by: Jeremy S. | last post by:
By default, Web.config has the following section: <compilation defaultLanguage="c#" debug="true" /> note that debug="true" There is a comment - also in the default Web.config - that states that making debug="false" will result in faster performance but a loss of
3
1648
by: Whiplash | last post by:
I've got a web app that has the debug parameter in the web.config file set to true. Everything works great. However, I want to set debug to false before putting the app into production. When I do so, I get an error that states; "Object reference not set to an instance of an object". It also does not have any more information and tells me to set debug to true to see more info. But of course, when I set debug to true, the app works fine! ...
2
11203
by: wcchan | last post by:
Hi, We set debug="false" at web.config of a WebService for performance sake. We found that after set, the web service request will sometimes got a timeout exception. Would anyone tell me how long the web service request be timeout and how to configure the timeout limit of the webservice calls? Thanks advance.
1
2384
by: joemynz | last post by:
Help please with a URLError. Invoking a url that works in Firefox and IE results in a "urlerror 7, no address ..." in python. I need to debug why. Traceback is below. There's a redirect when the url is invoked (it's part of a chain) - you can see it using liveheaders in firefox. What is the best way to debug this? I tried setting debug on HTTPConnection but this doesn't work (from some web posts, setting debug is broken in 2.4). What's...
5
1557
by: Cas | last post by:
Hi, If i omit to mention e.g. the option 'debug' in the line below of an aspx file, does it means it's set to false? <%@ Page Language="VB" CodeFile="any.aspx.vb" Inherits="_Default" %> Thanks Cas
3
3101
by: André | last post by:
Hi, I put that question already, but it's still not very clear to me, so ... Assume following option in web.config= debug="false" but in one aspx page (test.aspx) <%@ debug="true" ..%>
10
1307
by: Paul Rubin | last post by:
So I have some assert statements in my code to verify the absence of some "impossible" conditions. They were useful in debugging and of course I left them in place for "real" runs of the program. Umpteen hours into a run, an assertion failed, and of course since failure was "impossible", I didn't catch the exception so the whole program crashed. I don't know what I'd have done with the exception anyway, since it would have had to be...
0
8385
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8303
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
8723
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...
1
8502
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
8602
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
6162
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
5632
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
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1601
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.