cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Debugging PRIME Programms

Efried
7-Bedrock

Debugging PRIME Programms

Hello,

in the old Mathcad you could step to the last error in programms, now I have no clue what the meaning of the messages are...

thanks

14 REPLIES 14
Werner_E
25-Diamond I
(To:Efried)

Maybe the absence of any debugging tools was made on purpose and users of Prime are not supposed to do any programming at all. As PTC stated it here in http://blogs.ptc.com/2012/02/29/mathcad-prime-2-0-is-here/:

"Today, we are proud to release a powerful productivity and analysis tool that allows engineers to stay focused on engineering, and not programming and debugging."

'Nough said.

Efried wrote:

Hello,

in the old Mathcad you could step to the last error in programms, now I have no clue what the meaning of the messages are...

thanks

DegugingPrimr.png

Valery, you are referring to statements, not a program.

sorry now it works...

funningly enough the errors disappear with time - walking backwards through the errors - and reappear after starting the process again..

PRIME is a wonder!

Efried wrote:

PRIME is a wonder!

... but has not trace and pause functions and the trace window

Regular Mathcad has those debbugind tools:

http://twt.mpei.ac.ru/ochkov/Mathcad_12/6_24b_Trace_in_MC13.gif :

Trace operator in Mathcad Prime (as in Mathcad 12, 11, 2001,,,

Trace.png

TraceNo.png

Dear Valery, I like your approach. But if you head for a walk through in a programm with errors this method is not of big help unless you insert an "onerror" statement which returns the current state. Again such functions are lacking in Prime.

I personally do not understand why it is so complicated to give programmes the same set of functions like in Mathcad. For the moment I'm stuck because it is not possible what went wrong converting the sheet from Mathcad to prime.

Another problem with storing the tracing results is that this may create memory problems.

One old idea for programm debugging - useing not the add line operator but a matrix:

MatrixProgr.png

Valery Ochkov wrote:

One old idea for programm debugging - useing not the add line operator but a matrix:

But again this won't help for stepping through a program which has errors, as was demanded by EFried, or does it??

Efried
7-Bedrock
(To:Werner_E)

actually it is possible to step through. However this helped not tracing the error - and Prime has some recalculating cycles which do not allow to use the feature every time you try. So sometimes the walk through is disabled. There was no reaction to my question about the int32 error, so I have given up testing the calculation times with multi threading for the moment.

Werner_E
25-Diamond I
(To:Efried)

Efried wrote:

There was no reaction to my question about the int32 error, so I have given up testing the calculation times with multi threading for the moment.

A very specific error, I guess. You once wrote in a thread that you removed the version of VB Runtime which is stated as reqirement for MC15, replaced it by a newer one and then manually registered ythe ocx. Not sure, but maybe thats the cause for the new troubles now?

Efried
7-Bedrock
(To:Werner_E)

yes indeed- my guess is that it is related to the C-compilers not VB.

Efried
7-Bedrock
(To:Efried)

but you can't work with ist if you don't know what is going on, If you trace back to the error, Prime recalculates and everything is fine. If you go to the call of the programm the error is here again....

The AppendPrn method for tracing has worked out - but the scalars written to the file are in conflict with the error statement "no scalar!".

And here is the potential solution - i is really cumbersome typing out Variables in Prime because of its slowness and lacking subscript "." keyboard function:

Mathcad was more tolerant towards vectors containing [n x 1] [n x 1] elements, while PRIME refuses to see the elements as scalar. Well this would mean to change a lot, but I will start checking that out with Mathcad first, saving me some time.

potentially solved....

Efried wrote:

actually it is possible to step through. However this helped not tracing the error...

Something better than nothing!

Announcements

Top Tags