Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Out Of Scope, Debugging Problem

Out Of Scope, Debugging Problem

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialcsharpc++algorithms
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    thenutz72
    wrote on last edited by
    #1

    Hi All, I'm a pretty experienced programmer but can't figure how to see the value of some variables when in debugger - either Watch Window or the Immediate Window (.NET 2008, C++). The Watch Window lists them as :Out of Scope. At the least any variable passed into a function is not visible. Example: void MyFunction(int x, Int32 y) { int i; i = x * y; } i would be available but x & y are not. I've tried some project settings, optimization is off. Any help?

    B S _ 3 Replies Last reply
    0
    • T thenutz72

      Hi All, I'm a pretty experienced programmer but can't figure how to see the value of some variables when in debugger - either Watch Window or the Immediate Window (.NET 2008, C++). The Watch Window lists them as :Out of Scope. At the least any variable passed into a function is not visible. Example: void MyFunction(int x, Int32 y) { int i; i = x * y; } i would be available but x & y are not. I've tried some project settings, optimization is off. Any help?

      B Offline
      B Offline
      BobInNJ
      wrote on last edited by
      #2

      I tried your example and the debugger could show the values of i, x and y. I am doing this in debug mode. I am not sure why you are having a problem. If you could post the entire program that might help. Not sure. Bob

      1 Reply Last reply
      0
      • T thenutz72

        Hi All, I'm a pretty experienced programmer but can't figure how to see the value of some variables when in debugger - either Watch Window or the Immediate Window (.NET 2008, C++). The Watch Window lists them as :Out of Scope. At the least any variable passed into a function is not visible. Example: void MyFunction(int x, Int32 y) { int i; i = x * y; } i would be available but x & y are not. I've tried some project settings, optimization is off. Any help?

        S Offline
        S Offline
        Stuart Dootson
        wrote on last edited by
        #3

        I presume the PC is pointing within the function? I compiled and linked your code and I was able to see the parameters.

        Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

        1 Reply Last reply
        0
        • T thenutz72

          Hi All, I'm a pretty experienced programmer but can't figure how to see the value of some variables when in debugger - either Watch Window or the Immediate Window (.NET 2008, C++). The Watch Window lists them as :Out of Scope. At the least any variable passed into a function is not visible. Example: void MyFunction(int x, Int32 y) { int i; i = x * y; } i would be available but x & y are not. I've tried some project settings, optimization is off. Any help?

          _ Offline
          _ Offline
          _Superman_
          wrote on last edited by
          #4

          The breakpoint where the program has halted on is probably outside MyFunction.

          «_Superman_» I love work. It gives me something to do between weekends.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups