debugger

debugger - Сообщения

#1 Опубликовано: 27.11.2010 11:57:31
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 сообщений из 1708 понравились пользователям.

Группа: Moderator

Just for testing... debug_20101127.7z


debug.dll contains 2 functions: echo() and bp(). Plugin must be placed in "plugins\userefi" folder.
mcadefi plugin must be installed first.

bp() and echo() can display only the numbers united in a vector. Nested structures aren't supported.
Russia ☭ forever, Viacheslav N. Mezentsev
#2 Опубликовано: 27.11.2010 12:23:34
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 сообщений из 1708 понравились пользователям.

Группа: Moderator

and how to use...
Russia ☭ forever, Viacheslav N. Mezentsev
#3 Опубликовано: 27.11.2010 12:45:54
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

uni you are amazing!

I just do not know what to say, but this one is just great !

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#4 Опубликовано: 27.11.2010 12:59:58
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 сообщений из 1708 понравились пользователям.

Группа: Moderator

Unfortunately, I can't write the full manual in English. If somebody has made it for me...

P.S. echo(stack(1;2;3;4;5)^T) works too.
Russia ☭ forever, Viacheslav N. Mezentsev
#5 Опубликовано: 27.11.2010 13:26:14
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

Wrote

Unfortunately, I can't write the full manual in English. If somebody has made it for me...

P.S. echo(stack(1;2;3;4;5)^T) works too.


I hope that some good willing people from the native English speking region will contact you and help you out with this.

BTW, I was wandering many times how the things would going on with the waste of numerical procedures written in C, C++, C# etc. Could they be introduced in SMath via plugins. Please forgive me for my ignorance, but could you just give me just a short explanation if there is any chance to make a plugin for SMath from, say SUNDIALS solvers.
https://computation.llnl.gov/casc/sundials/main.html
This one crossed my mind at the moment.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#6 Опубликовано: 27.11.2010 14:03:14
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 сообщений из 1708 понравились пользователям.

Группа: Moderator

Цитата

Could they be introduced in SMath via plugins. Please forgive me for my ignorance, but could you just give me just a short explanation if there is any chance to make a plugin for SMath from, say SUNDIALS solvers.


Yes, it is possible and not so hard I think. Section "A.2.2 Configuring, building, and installing on Windows" (KINSOL Installation Procedure pdf) describes how to make this in Visual Studio 6.0. After that you can make plugin for SMath Studio in VS2008, but on C++/CLI platform.
Russia ☭ forever, Viacheslav N. Mezentsev
#7 Опубликовано: 27.11.2010 14:20:23
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

Wrote

Цитата

Could they be introduced in SMath via plugins. Please forgive me for my ignorance, but could you just give me just a short explanation if there is any chance to make a plugin for SMath from, say SUNDIALS solvers.


Yes, it is possible and not so hard I think. Section "A.2.2 Configuring, building, and installing on Windows" (KINSOL Installation Procedure pdf) describes how to make this in Visual Studio 6.0. After that you can make plugin for SMath Studio in VS2008, but on C++/CLI platform.


Thank you for the quick answer. I am pleasently surprised that this could be done . I hope that sooner or later you or someone else - who might follow your steps - will extend the SMath with these or some other numerical solvers.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#8 Опубликовано: 27.11.2010 14:32:20
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 сообщений из 1708 понравились пользователям.

Группа: Moderator

I already do similar work: http://www.alglib.net/
Plugin: AlgLib.dll

For now just 5 functions: al_airy(), al_beta(), al_convr1d(), al_fftc1d(), al_fftc1dinv().
For testing as usual.
Russia ☭ forever, Viacheslav N. Mezentsev
1 пользователям понравился этот пост
Radovan Omorjan 27.11.2010 15:54:00
#9 Опубликовано: 30.11.2010 07:02:03
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

Hello uni

I think I figured out the basics of the debugger using. Some sort of Help or short Users's guide would be helpful, but it seems not complicated to make break points with bp() and echoing variables with echo().
Here is a screenshot:

This is something I've never used in Mathcad. I just stayd with different "return" points in order to debug, say, a multiline function. Regarding SMath I think the debugger might be much more useful IMHO. However, SMath does not have yet the ability to insert or delete placeholders (break points, echoing) in the line() environment. Using the debugger would be much easier by having this feature (I hope it will be introduced sooner or later).
As it is a test version, I have just few questions.
- I can not figured out what is the matrix window used for.
- As it is from Mathcad - there are row and columns number starting from zero (SMath uses unity as a starting index positions). Actually, this one is not so important.
- If I close the debugger window at some break point, I do not know how to get it back without interupting and restarting all the calculation in the worksheet.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#10 Опубликовано: 30.11.2010 08:01:06
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 сообщений из 1708 понравились пользователям.

Группа: Moderator

Цитата

However, SMath does not have yet the ability to insert or delete placeholders (break points, echoing) in the line() environment. Using the debugger would be much easier by having this feature (I hope it will be introduced sooner or later).

Already done. Use templates: t1.clp, t2.clp ... t6.clp. These are clipboard files. Select "bp()" and copy in a clipboard, open it (clipbrd.exe) and save contained in a file (NT format, .clp). Files should be allocated in the same folder (userefi). Restart SMath. Look at the templates toolbar. If there are all six files all buttons will be accessible.

Цитата

- I can not figured out what is the matrix window used for


This debugger is used not completely. These windows are necessary for display of matrixes. But for this purpose I need to implement undocumented methods for operation with nested structures in a file mcadefi.dll. Debugger supports them. Do not use this feature.

Цитата

- I do not know how to get it back without interupting and restarting all the calculation in the worksheet.


This debugger is a plugin of the second level. It is very difficult to organize interaction without having communication with SMath window.
For interrupt use .
For window recovery recalculate: "echo(0)=".

To distinguish break points I used labels in the form of strings, but in SMath it is impossible yet. You can use numbers:
bp(stack(1;a;b ))
bp(stack(2;a;b ))

Цитата

As it is from Mathcad - there are row and columns number starting from zero (SMath uses unity as a starting index positions). Actually, this one is not so important.

I change this later.
Russia ☭ forever, Viacheslav N. Mezentsev
#11 Опубликовано: 30.11.2010 12:25:30
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

Hello uni,
Wrote

Цитата

However, SMath does not have yet the ability to insert or delete placeholders (break points, echoing) in the line() environment. Using the debugger would be much easier by having this feature (I hope it will be introduced sooner or later).

Already done. Use templates: t1.clp, t2.clp ... t6.clp. These are clipboard files. Select "bp()" and copy in a clipboard, open it (clipbrd.exe) and save contained in a file (NT format, .clp). Files should be allocated in the same folder (userefi). Restart SMath. Look at the templates toolbar. If there are all six files all buttons will be accessible.



Thank you for the answer. Actually, I did not understand this thing about templates - sorry. I made all the files and have the Templates 3,4,5,6 active in the Debugger menu - but do not know what to do with them. I was played with bp() inside multiline functions and figured out that there must be "if" clause, as you explained, in order to make a break point and to, say, go step by step. I managed to do this.
On the other hand, I do not know how are we going to get rid of these break points if we do not need them anymore.

Never mind, I like that this is working and will play some more to get more acquainted with this feature

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений