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

Home Posts Topics Members FAQ

System.Diagnost ics.Debug

In my Smart Device Project, I'm trying to show a message only when
debugging. We used to be able to do this with Debug.Print in VB 6. I've
tried System.Diagnost ics.Debug.Write Line and this doesn't seem to do
anything - I can't see it writing anywhere.

I also tried Debug.Assert and Debug.Fail and both of these do show the
message on the Pocket PC device, but then when I click on Continue or Debug
at the bottom of the message on the device, I get a NullReferenceEx ception
in Visual Studio.

Can someone explain what is going on here?
Nov 20 '05 #1
4 2366
Hi,

Debug.writeline will send it output to the ide's output window
when the application in running in debug mode.

Ken
--------------
"Mike" <mi*******@nosp am.msn.com> wrote in message
news:Oy******** ******@TK2MSFTN GP09.phx.gbl...
In my Smart Device Project, I'm trying to show a message only when
debugging. We used to be able to do this with Debug.Print in VB 6. I've
tried System.Diagnost ics.Debug.Write Line and this doesn't seem to do
anything - I can't see it writing anywhere.

I also tried Debug.Assert and Debug.Fail and both of these do show the
message on the Pocket PC device, but then when I click on Continue or Debug at the bottom of the message on the device, I get a NullReferenceEx ception
in Visual Studio.

Can someone explain what is going on here?

Nov 20 '05 #2
It's not. Has anyone tried Debug.WriteLine in a Smart Device project?

"Ken Tucker [MVP]" <vb***@bellsout h.net> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Hi,

Debug.writeline will send it output to the ide's output window
when the application in running in debug mode.

Ken

Nov 20 '05 #3
Hi Mike,

The initial release of the Visual Studio.NET debugger for the .NET Compact
Framework does not implement this feature. However, you can define your own
listener classes within your application to handle the debug messages.

Jimmy Zhu

Nov 20 '05 #4
Thanks.

"Jimmy Zhu" <ji*****@online .microsoft.com> wrote in message
news:em******** ******@cpmsftng xa06.phx.gbl...
Hi Mike,

The initial release of the Visual Studio.NET debugger for the .NET Compact
Framework does not implement this feature. However, you can define your own listener classes within your application to handle the debug messages.

Jimmy Zhu

Nov 20 '05 #5

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

Similar topics

7
4238
by: Microsoft News | last post by:
Hi all. Does id() xpath function work in System.XML? I have built dtd, schema, xdr for a simple xml which includes attributes definded as ID and IDREFS. Validation is occurring properly for all the types of metadata, but the id() function applied to the IDREFS attribute allways returns nothing. I have tried it from xslt and using the XmlNode.selectnodes or XPathNavigator.Select nada zilch
1
322
by: Raj Dhrolia | last post by:
Hi, In one of my method, I want to know the class/function that called/invoked this method. i.e. i have a function named Method1() in class1. I want "ClassX.MethodX()" in Method1(), when MethodX() of ClassX invokes Method1() function I think System.Reflection might provide some help. Regards.
2
5864
by: cody | last post by:
System.Diagnostics.Debug.Assert(); Hello??? A language should encourage programmers to heavily use the assert-feature, since it improves safety, stability, readability and maintainability of software. Most language designers recognized this, see C/C++ and Java which supports an assert keyword. My question now is, will C# support in future a single keyword for System.Diagnostics.Debug.Assert(), just like lock is a keyword for...
2
5025
by: Joey Mack | last post by:
Greetings. I am trying to use the System.Diagnostics.Process class to perform some actions through the Windows command line. The applicable code appears below. The code builds the follow command fine, and will open the command line in the proper working directory, but will not send the follow-up command to the command line. The code also catches no errors. Any assistance would be greatly appreciated.
4
718
by: A.M | last post by:
Hi, If I use System.Diagnostics.Debug.WriteLine in a asp.net application, where does the output go? Is there any trace monitor application thar shows me the trace output? Thanks, Allan
4
15630
by: Jiho Han | last post by:
I have the following defined in web.config under <configuration> node: <system.diagnostics> <switches> <add name="MainSwitch" value="4"/> </switches>
1
4343
by: Patrick | last post by:
When Tracing in ASP.NET, the IIS process (on IIs5.1) is locking on the Trace file, and I can't read the trace file without restarting the IIS: Even the following does NOT work (how could I fix this??): System.Diagnostics.Trace.WriteLine(System.DateTime.Now.ToLongTimeString()+ "--" + dirException.ToString()); System.Diagnostics.Trace.Flush(); ((System.Diagnostics.TraceListener) System.Diagnostics.Trace.Listeners).Close();
8
476
by: Mike | last post by:
In my Smart Device Project, I'm trying to show a message only when debugging. We used to be able to do this with Debug.Print in VB 6. I've tried System.Diagnostics.Debug.WriteLine and this doesn't seem to do anything - I can't see it writing anywhere. I also tried Debug.Assert and Debug.Fail and both of these do show the message on the Pocket PC device, but then when I click on Continue or Debug at the bottom of the message on the...
11
3744
by: Nurit N | last post by:
This is the third newsgroup that I'm posting my problem. I'm sorry for the multiple posts but the matter becoming urgent. I hope this is the right place for it... I have created a very simple batch file (echo hello world) and was trying to retrieve the standard output but every time I run the code it returns ExitCode as 1.
3
4028
by: Haldun ALIML | last post by:
Suppose that you have below property in some class, #if DEBUG public string DebugInfo { get { return "INDEX : " + _name + "\n" + "Index Owner : " + _owner.Name + "\n" + "Index Column Count: " + _columns.Count + "\n"; }
0
8403
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
8316
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
8833
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...
0
8737
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
8509
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
8610
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...
0
7345
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6174
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...
2
1967
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.