473,399 Members | 3,106 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,399 software developers and data experts.

Debugging Issue

Hi I'm new to c# and .net from a vb6 background and i'm having issues with
the debugging of applications

I am trying to create a watch on an expression
aString.IndexOf(",",0).ToString()
but either in the watch window or the immediate window I get an out of scope
Error

however if the program runs through it returns a value.

Has anyone got an idea of what I am doing wrong

Jul 21 '05 #1
3 1845
Hi PeteMc,

The debugger windows need to be in the same scope of the variable where it
is declared to work. So, put a breakpoint within this scope and try.

HTH,
Rakesh Rajan

"PeteMc" wrote:
Hi I'm new to c# and .net from a vb6 background and i'm having issues with
the debugging of applications

I am trying to create a watch on an expression
aString.IndexOf(",",0).ToString()
but either in the watch window or the immediate window I get an out of scope
Error

however if the program runs through it returns a value.

Has anyone got an idea of what I am doing wrong


Jul 21 '05 #2
this is a very simple example of what is happening when I use a breakpoint on
the
textBox1.Text = aString.IndexOf(",",0).ToString(); Line
private void button1_Click(object sender, System.EventArgs e)
{
string aString;

aString = "Testing Index of, In a Watch";
textBox1.Text = aString.IndexOf(",",0).ToString();

}

putting a watch on the aString.IndexOf(",",0).ToString()

returns the following in the watch window while in breakmode

aString.IndexOf(",",0).ToString() error: 'aString.IndexOf' does not exist
cheers
PeteMc
"Rakesh Rajan" wrote:
Hi PeteMc,

The debugger windows need to be in the same scope of the variable where it
is declared to work. So, put a breakpoint within this scope and try.

HTH,
Rakesh Rajan

"PeteMc" wrote:
Hi I'm new to c# and .net from a vb6 background and i'm having issues with
the debugging of applications

I am trying to create a watch on an expression
aString.IndexOf(",",0).ToString()
but either in the watch window or the immediate window I get an out of scope
Error

however if the program runs through it returns a value.

Has anyone got an idea of what I am doing wrong


Jul 21 '05 #3
Hi Pete,

Put a breakpoint in the aString line. Check whether the watch is still
showing the same message.

HTH,
Rakesh Rajan

"PeteMc" wrote:
this is a very simple example of what is happening when I use a breakpoint on
the
textBox1.Text = aString.IndexOf(",",0).ToString(); Line
private void button1_Click(object sender, System.EventArgs e)
{
string aString;

aString = "Testing Index of, In a Watch";
textBox1.Text = aString.IndexOf(",",0).ToString();

}

putting a watch on the aString.IndexOf(",",0).ToString()

returns the following in the watch window while in breakmode

aString.IndexOf(",",0).ToString() error: 'aString.IndexOf' does not exist
cheers
PeteMc
"Rakesh Rajan" wrote:
Hi PeteMc,

The debugger windows need to be in the same scope of the variable where it
is declared to work. So, put a breakpoint within this scope and try.

HTH,
Rakesh Rajan

"PeteMc" wrote:
Hi I'm new to c# and .net from a vb6 background and i'm having issues with
the debugging of applications

I am trying to create a watch on an expression
aString.IndexOf(",",0).ToString()
but either in the watch window or the immediate window I get an out of scope
Error

however if the program runs through it returns a value.

Has anyone got an idea of what I am doing wrong


Jul 21 '05 #4

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

Similar topics

2
by: Kenneth Myhra | last post by:
Hi, We have been trying to develop an IHTTPModule (that was supposed to replace or take over the ISAPI Filters, as far as we know). We have developed one in C# and it seems to be working. The...
0
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs...
16
by: Serdar Kalaycý | last post by:
Hi everybody, My problem seems a bit clichè but I could not work around. Well I read lots of MSDN papers and discussions, but my problem is a bit different from them. When I tried to run the...
5
by: Velvet | last post by:
Can someone tell me to what process I need to attach to be able to step through my classic ASP code in VS.net 2003. I'm working on an XP box with IIS installed. I also have VS.net 2005 (The...
5
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As...
3
by: Tom | last post by:
We are experiencing some wierd debugging behavior. What happens is that, during debugging with VS 2003, the debugger seems to 'skip' statements that are associated with database operations. For...
3
by: Herb | last post by:
while trying to run this project. I recently loaded VS2005 onto my WinXP Pro computer. Prior to that I was able to start my VS2003 ASP.NET apps in debug mode. When I attempt to do so now, I get...
7
by: | last post by:
I'm writing an ASP.NET app, using Visual Studio 2003. VS is running locally on my laptop, but the web app is running on a remote server. My laptop is not in the domain. I do have a domain account....
3
by: Rick | last post by:
We have a web site that was built as an ASP.Net Web Site, I am unable to remote debug, when build ing the web site there is not a dll or PDB file generated. I can debug on my local machine but...
7
by: GaryDean | last post by:
(this was also posted on the MSDN WCF forum but the answers over there are not so good) I have a WCF Library hosted by IIS 6 and it all works fine. However I need to step through the code in the...
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: 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: 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
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
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...
0
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...
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...

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.