Debugger Window

Debugger Window - How to use the Begugger Window - Messages

#1 Posted: 3/8/2019 8:46:43 PM
RegCurry

RegCurry

0 likes in 57 posts.

Group: User

Are there instructions anywhere on how to use the debugger window? I have an attempt at a complicated coupled time domain finite difference routine (image below)that does not show an error in the routine when I run it, but the result show an error as noted in the image. All necessary parameters are defined above the routine in the full code. I will be happy to provide the full code, but I will have to restructure it to make it simpler and I would need to provide the txt file which it reads. As you might guess from my previous posts, this routine works in Mathcad. I am trying to convert to SMath.
Thanks,
Reg

Capture.JPG
#2 Posted: 3/8/2019 9:15:22 PM
Arie

Arie

93 likes in 285 posts.

Group: User

To answer you question. You can right click where your cursor is positioned in the picture and set break point. When you recalculate the page you can use the "pause", "continue", and "step into" buttons in the toolbar to step the program. I would recommend the step into button.

Side note: I believe SMATH isn't actually evaluating TDFD until you assign it to ans, which is why it doesn't throw an error.

Also in your program look at your defition of ΔV. It references n+1. but n goes to Ncell. There isn't a definition VT at Ncell+1.
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
#3 Posted: 3/8/2019 9:52:30 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Hi. You can use also use trace(OneArg) to show intermediate results, using View/Otuput Window from the SMath Menu for see the intermediate values. For example, you can trace(n) or trace(k), or trace(VG) to see the intermediate values inside the for loops. With that, hope you can seek the values of k or n which causes the problem: iteration stops with the problematic number. Also notice that you can insert several trace in the same function.

Best regards.
Alvaro.
#4 Posted: 3/8/2019 10:21:56 PM
RegCurry

RegCurry

0 likes in 57 posts.

Group: User

Thanks guys. I will give both a try.
  • New Posts New Posts
  • No New Posts No New Posts