Results 1 to 6 of 6

Thread: [RESOLVED] F8 (stepping)executes only first DIM stmt and that's it

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2010
    Posts
    28

    Resolved [RESOLVED] F8 (stepping)executes only first DIM stmt and that's it

    Code:
        
    'global declaration
        Dim FILE_NAME As String = "EventList.txt"
        Dim PATH_FILE As String = Environment.CurrentDirectory() & "\" & FILE_NAME
    'end of global declaration
    
    Private Sub ProcessFiles()
            Dim fs As New FileStream(PATH_FILE, FileMode.Open, FileAccess.Read)
            Dim sr As New StreamReader(fs)
            Dim TextLine As String  'line from file
    
            MsgBox(PATH_FILE)
            Do Until sr.EndOfStream()
                TextLine = sr.ReadLine
                MsgBox(TextLine)
            Loop
        End Sub
    Using F8 to step through all of the code, it gets to this sub, highlites Dim fs ...
    and then hit F8 again it just pops up the form, no message boxes - nothing. Other notes: EventList does exist in stated directory.

    Any ideas why it wouldn't complete the sub?

    the first debug line after hit the f8 is:
    A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
    ...but the file is there! all 14kb of it.
    Last edited by n_minus_one; Dec 23rd, 2010 at 09:36 PM. Reason: more info

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width