Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Modelica Algorithmic Subset Debugger

Modelica Algorithmic Subset Debugger

Hello.
I have been trying to run the Modelica Algorithmic Subset Debugger in the Eclipse.
I try to do it exactly like written in the Chapter 10 of Modelica Users Guide.
I try to open the HelloWorl programme in the debugger and for that I use this .mos file:

setCommandLineOptions({"+d=rml,noevalfunc","+g=MetaModelica"});
setEnvironmentVar("MODELICAUSERCFLAGS","-g");
loadFile("HelloWorld.mo");
getErrorString();
HelloWorld(120.0);
getErrorString();

In the console i read: "Error: Looking for a function HelloWorld but found a CLASS.

And thats all, what I can get from the debugger.
How to run my HelloWorld programme in the debugger?
Thanks

Re: Modelica Algorithmic Subset Debugger

The error says it all. Change your HelloWorld class to function.

Adeel.

Re: Modelica Algorithmic Subset Debugger

Hi,

Not really, depends on what you want to debug. If you want to debug Modelica code your HelloWorld model should contain a call to a function that you have defined in your model. Also the mos script is wrong. For normal Modelica code (not MetaModelica code) should be:

Code:


setCommandLineOptions({"+d=gendebugsymbols"});
setEnvironmentVar("MODELICAUSERCFLAGS","-g");
loadFile("HelloWorld.mo"); getErrorString();
buildModel(HelloWorld); getErrorString();

Then you use HelloWorld.exe in Eclipse to do the debugging.

Cheers,
Adrian Pop/

Re: Modelica Algorithmic Subset Debugger

We should really update the User's guide as is quite wrong. +g=MetaModelica will only accept MetaModelica programs.

There are 0 guests and 0 other users also viewing this topic
You are here: