Results 1 to 6 of 6

Thread: [RESOLVED] Why is my subroutine not being called ?

  1. #1

    Thread Starter
    PowerPoster Poppa Mintin's Avatar
    Join Date
    Mar 2009
    Location
    Bottesford, North Lincolnshire, England.
    Posts
    2,429

    Resolved [RESOLVED] Why is my subroutine not being called ?

    Hi,

    I have to re-write an application that's been running for years because it takes as its input text that I've copied from a website, the particular website has recently changed the format with which it displays its output.

    So... I believe that I've re-formatted the data to present the data to my original subroutine in the original format.
    When I call the subroutine, everything just stops. I can't find where the... (I don't know what to call it) ...the place where the code is at... usually the line is coloured yellow and there's a little yellow arrow in the margin, I can't find that and the whole of the code and the Watch page are 'fogged' out. Nothing responds to mouse clicks.

    I've had something similar before but usually discovered what I've done wrong, but this time the called subroutine hasn't been touched, the data is in the ListOfString in the same format... It just stops.

    Nothing from intellisence

    At the moment I've not included any code because, for now, I'm hoping for some general pointers as to where to look.


    Poppa
    Last edited by Poppa Mintin; Oct 1st, 2021 at 07:14 AM.
    Along with the sunshine there has to be a little rain sometime.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,350

    Re: Why is my subroutine not being called ?

    You won't get the line highlighted in yellow unless the debugger is in break mode, which it apparently isn't. Set a break point earlier so that the debugger does break, then then step through the code by line and you should hopefully be able to find out where things go wrong.

  3. #3

    Thread Starter
    PowerPoster Poppa Mintin's Avatar
    Join Date
    Mar 2009
    Location
    Bottesford, North Lincolnshire, England.
    Posts
    2,429

    Re: Why is my subroutine not being called ?

    Quote Originally Posted by jmcilhinney View Post
    You won't get the line highlighted in yellow unless the debugger is in break mode, which it apparently isn't. Set a break point earlier so that the debugger does break, then then step through the code by line and you should hopefully be able to find out where things go wrong.
    Thanks John,

    At the time I thought you were right, I did that and it all stepped through, but I must've already done something by the time I received your answer.

    Now however, I have the same problem, I have definitely got a breakpoint set, the process stopped at the breakpoint, I single stepped down to my subroutine... Single stepped to call the subroutine... nothing, all the code goes 'foggy', the watch pane goes 'foggy' and the step buttons all go blank. The only response is to the 'Stop debugging' button.


    Poppa
    Along with the sunshine there has to be a little rain sometime.

  4. #4
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,600

    Re: Why is my subroutine not being called ?

    Quote Originally Posted by Poppa Mintin View Post
    Thanks John,

    At the time I thought you were right, I did that and it all stepped through, but I must've already done something by the time I received your answer.

    Now however, I have the same problem, I have definitely got a breakpoint set, the process stopped at the breakpoint, I single stepped down to my subroutine... Single stepped to call the subroutine... nothing, all the code goes 'foggy', the watch pane goes 'foggy' and the step buttons all go blank. The only response is to the 'Stop debugging' button.


    Poppa
    A picture might help at this point. I have my suspicions about what is happening but I don't want to make a guess.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  5. #5

    Thread Starter
    PowerPoster Poppa Mintin's Avatar
    Join Date
    Mar 2009
    Location
    Bottesford, North Lincolnshire, England.
    Posts
    2,429

    Re: Why is my subroutine not being called ?

    Quote Originally Posted by Niya View Post
    A picture might help at this point. I have my suspicions about what is happening but I don't want to make a guess.
    That's weird, I ran the app., it stopped at the breakpoint, I took a screenshot... stepped up to where the next step would call my subroutine, I took a screenshot... stepped into the sub' and this time it just went strait into the sub !

    Now I am confused.

    Ah ! I tried that again, and it went strait into the sub' again. I still don't know why it does it, but I've found when it does it... It goes wrong when I step with the 'Step-Over' rather than with the 'Step-Into'.
    I usually use step-over to save stepping through other sub's or functions. (Must be tired)

    So... I reckon that's sorted out my problem, lesson learned.


    Poppa.
    Along with the sunshine there has to be a little rain sometime.

  6. #6
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,600

    Re: [RESOLVED] Why is my subroutine not being called ?

    Ah ok.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

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