Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
4 registered members (NewbieZorro, Grant, TipmyPip, AndrewAMD), 13,346 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Strange debug behavior #146277
08/06/07 19:45
08/06/07 19:45
Joined: Aug 2005
Posts: 10
bconyne Offline OP
Newbie
bconyne  Offline OP
Newbie

Joined: Aug 2005
Posts: 10
I can't seem to watch any local variables, only globals - I assume this is a bug, because it's unimaginable to me that you can't look at the value of a local. But for example, if you run the following code, and put a breakpoint on the first line of the function localVarTest ("localVariable = 1;"), you always see the status of localVariable as "Not available" - even as you step through the code that modifies the variable.

I can look at globalVariable just fine, but there's no way I'm using exclusively global vars in my code.

Anyway, I created the simplest example I could to demonstrate the problem:

////////////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>

var globalVariable = 10;

////////////////////////////////////////////////////////////////////


function localVarTest()
{
var localVariable;

localVariable = 1; // can't watch this var
localVariable++; // still can't watch it
}

function main()
{
globalVariable++; // I can watch this just fine
localVarTest();
}

Re: Strange debug behavior [Re: bconyne] #146278
08/06/07 20:44
08/06/07 20:44
Joined: Aug 2005
Posts: 10
bconyne Offline OP
Newbie
bconyne  Offline OP
Newbie

Joined: Aug 2005
Posts: 10
Doh! Never mind, this is explained in the "Migration to Lite C" section of the manual - it's expected behavior, you have to temporarily replace locals with a global variable, e.g., temp = myLocalVar;

Sorry to waste everybody's bandwidth on this.

--Bob

Re: Strange debug behavior [Re: bconyne] #216106
07/15/08 08:16
07/15/08 08:16
Joined: Jun 2005
Posts: 87
France
MadJack Offline
Junior Member
MadJack  Offline
Junior Member

Joined: Jun 2005
Posts: 87
France
I am glad to find this thread at last !
It is not obvious to find this in the manual.

Thanks Bob !


Commercial A7.25b
RUGod

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1