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

Results different in Output window than Immediate Window

I'm getting different results when I display a value in
the Output window as opposed to the Immediate window.
Why?

Code to recreate problem:

'Purpose: Get different results from Output
window than Immediate
' window.

Dim sInput As String = Chr(48) & Chr(48) & Chr
(48) & Chr(0) & Chr(0) & Chr(48)
Dim sExpression As String
Dim m As Match
Dim re As Regex

'Pull everything but the garbage on the end.
sExpression = "(?<fieldvalue>.+\w+)(?
<garbage>\W*)"
re = New Regex(sExpression)
m = re.Match(sInput)
If m.Success Then

'Debug.writeline returns "6".
Debug.WriteLine(Now.ToString & " length is "
& m.Result("${fieldvalue}").Length)

'Set a breakpoint on the Beep.
'Run "? m.Result("${fieldvalue}").Length) in
the
'Immediate window.
'I get "3". Why different than "6" above?
Beep()
Else
MessageBox.Show("Something went way wrong.")
End If

End Sub

Jul 21 '05 #1
2 2887
I'm getting different results when I display a value in
the Output window as opposed to the Immediate window.
Why?


The debugger doesn't handle strings containing null characters
correctly.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.
Jul 21 '05 #2
Hi Dave,

This is a known issue. The problem lies in the debug API and will not be
fixed.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

--------------------
| Content-Class: urn:content-classes:message
| From: "Dave" <dv****@5280Solutions.com>
| Sender: "Dave" <dv****@5280Solutions.com>
| References: <05****************************@phx.gbl>
<O7**************@TK2MSFTNGP12.phx.gbl>
| Subject: Re: Results different in Output window than Immediate Window
| Date: Tue, 7 Oct 2003 07:32:55 -0700
| Lines: 24
| Message-ID: <10****************************@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: quoted-printable
| X-Newsreader: Microsoft CDO for Windows 2000
| Thread-Index: AcOM3+WYnwizbvMpQW2c8VG8bGtJIA==
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Newsgroups: microsoft.public.dotnet.general
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:111033
| NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
| X-Tomcat-NG: microsoft.public.dotnet.general
|
| Thanks!
| Anyone know when a fix will be available?
| >-----Original Message-----
| >
| >>I'm getting different results when I display a value in
| >>the Output window as opposed to the Immediate window.
| >>Why?
| >
| >The debugger doesn't handle strings containing null
| characters
| >correctly.
| >
| >
| >
| >Mattias
| >
| >--
| >Mattias Sjögren [MVP] mattias @ mvps.org
| >http://www.msjogren.net/dotnet/
| >Please reply only to the newsgroup.
| >.
| >
|

Jul 21 '05 #3

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

Similar topics

1
by: Roger | last post by:
Are these two features available in VS.Net 2003 at all (maybe different keys)... F4 to go thru find-in-files search results (just like you F4 to go thru build errors). In VC6, if output window...
4
by: John A Grandy | last post by:
while stepping through code i'd like to dynamically see the output of my debug.writeline() statements as they are executed ... but the debug > windows > immediate doesn't show it
2
by: Dave | last post by:
I'm getting different results when I display a value in the Output window as opposed to the Immediate window. Why? Code to recreate problem: 'Purpose: Get different results from Output...
3
by: Russell Stevens | last post by:
Can anyone tell me how to get to the immediate window in VS2005. The help file says (when debugging) to click Debug, Windows, Immediate. There is no Immediate window listed there, nor anywhere else...
9
by: David A. Beck | last post by:
When I do a debug.print("blabla") in VB (VS2005) it doesn't show up in the output window, what gives?
2
by: dgk | last post by:
Using VS2005 Standard Edtion, I have an Immediate window during ASP debugging. My co-worker, using VS2005 Team Edtion does not have an Immediate window. He does have a Command window, which is sort...
5
by: Bob | last post by:
I'm not sure why this is happening. Using Access 2003. My code is as follows... Private Sub Command1_Click() Dim strSourceFile As String Dim strDestinationFile As String strSourceFile =...
1
kirubagari
by: kirubagari | last post by:
rivate Sub cmdscan_Click() Const a As Byte = 4 Const b As Byte = &HFF Dim I As Long Dim AnyChanged As Boolean Dim changeMade As Boolean Dim value As Byte Dim x Dim tmp As String
1
by: Primo | last post by:
I have 3 files and I want all of them to go to the bank and one of them will go to both the bank and a vendor. this is a code we have: <process name="FD_Generic_Outbound_banksplit"> ...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
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
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...
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,...
0
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...

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.