- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Modelica Algorithmic Subset Debugger
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.
- adeas
- 454 Posts
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/
- adrpo
- 885 Posts
Re: Modelica Algorithmic Subset Debugger
We should really update the User's guide as is quite wrong. +g=MetaModelica will only accept MetaModelica programs.
- adrpo
- 885 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Modelica Algorithmic Subset Debugger