Thread: The "no source code available here" notice prevents debugging

  1. #1
    Math wizard
    Join Date
    Dec 2006
    Location
    USA
    Posts
    582

    The "no source code available here" notice prevents debugging

    Any time I have math in a function call and I press F11 in Visual C++ 2008 Express, I get a notice stating that there is no source code at the current location and a choice to either choose "OK" or "show disassembly", for which the latter makes no sense at all to me as I have no clue what any of it means. However, if I press F10 instead to skip over the function call, debugging continues normally. The only way around this problem that I know of is to temporarily remove the math from the function call. Here's an example on what I'm referring to:

    Code:
    int DoSomeMath(int a, int b)
    {
       int c = 5;
       return a+b*c-7;
    }
    
    int main()
    {
       int x = 9;
       
       DoSomeMath(3, x); // press F11 here allows me to go into the function normally
       DoSomeMath(2*x, 6*(x-3)-4); // press F11 here and I get the "no source code" notice and debugging won't continue
       return 0;
    }
    What can I do to stop this from happening? Can't the math just get evaluated then step into the function so I can debug the function?
    High elevation is the best elevation. The higher, the better the view!
    My computer: XP Pro SP3, 3.4 GHz i7-2600K CPU (OC'd to 4 GHz), 4 GB DDR3 RAM, X-Fi Platinum sound, GeForce 460, 1920x1440 resolution, 1250 GB HDD space, Visual C++ 2008 Express

  2. #2
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    I suggest trying to turn off all compiler optimization; and, verify that debug options are correct.
    I rarely use VS so can NOT give any more help.

    Tim S.
    Last edited by stahta01; 10-20-2013 at 10:46 AM.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  3. #3
    Registered User
    Join Date
    Apr 2013
    Posts
    1,658
    One way around this, click on line 3 of DoSomeMath() and then click on "run to cursor".

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need "if","for loop",&"else" source codes
    By dn_angel_07 in forum C++ Programming
    Replies: 3
    Last Post: 10-07-2009, 10:01 PM
  2. Program source "code"?
    By ulillillia in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 05-09-2007, 01:06 AM
  3. "There is no source code available for the current location"
    By zaracattle in forum C++ Programming
    Replies: 2
    Last Post: 10-07-2006, 10:47 PM
  4. "Navy Battle" source code
    By simply_cool in forum C++ Programming
    Replies: 8
    Last Post: 05-23-2003, 04:19 AM
  5. Replies: 8
    Last Post: 04-28-2003, 07:29 PM

Tags for this Thread