Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6782543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:45:16+00:00 2026-05-26T16:45:16+00:00

One of the hardest things for me to debug, is when Mathematica says that

  • 0

One of the hardest things for me to debug, is when Mathematica says that it detected a problem, but it does not print to the console a message at the time it did.

Like this diagram

enter image description here

The way I debug is by Print messages. I have different level of debug messages and can turn them on and off when there is a problem to help me find the location. All my debug message go to the console.

Since Mathematica does not print to the console these warnings/errors, it is not possible to find where this message came from. If it did, then I would know, because I can see my own messages before it, and know from where and when this error happened.

Clicking on the little ‘+’ to see the error is after the fact, and it does not tell the location of the message.

I went to Edit/Preferences, and have everything turned on to print to console that I can see:

enter image description here

btw, this particular ‘error’ is (when I click on ‘+’)

InterpolatingFunction::dmval: Input value {0} lies outside the range 
of data in the interpolating function. Extrapolation will be used. >>

It prints to console only when I click on the ‘+’ by hand. I want this be done automatically when it happens.

So, my question is, how to make Mathematica print the above message to console, right when it happens?

ps. I do not know how to use WB to debug manipulate code.

thanks,

EDIT 1

I found the error, it was a typo in a name of a variable. If someone wants to see it, I put the notebook itself, and the error back in. I am sorry that I am not going to try to duplicate this in small program but this notebook will illustrate the issue in this folder there is the notebook (.nb) if someone wants to see it.

The error is that I wrote, in the module called ‘solve[]‘ above half way down the notebook, in the line where I set the local variables for this function, the following

Module[{numericalSolution, ic, t, ndsolveOptions, x1, x2, x3, x1de, 

the last variable above should have been ‘x1der’ and not ‘x1de’ as in:

Module[{numericalSolution, ic, t, ndsolveOptions, x1, x2, x3, x1der, 

fixing this, caused the error to go away.

Simply run the notebook, when it comes up, you’ll see the error on the UI cell bracket, but no error on the console. (Program not complete, but works, when done, will be on my web site Mathematica demonstrations page, it is a simulation of triple pendulum).

Question again, how to make Mathematica print this error to console at the time when it detects it.

thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:45:17+00:00Added an answer on May 26, 2026 at 4:45 pm

    From the screen shot it looks like you are using Manipulate. The reason for Manipulate (and other Dynamic construct) having red brackets to hide warnings and errors is that these messages can occur many many times while interacting, making the frontend unresponsive.

    To answer your question about debugging, here is one possible approach. Consider this simple Manipulate which will throw a warning when you move the slider to x=0:

    Manipulate[1/x, {{x, 1}, -3, 3, 1}]
    

    To understand the message, you can click on the top-right circled plus sign and select ‘Paste Snapshot’. This will paste a snippet of code that is equivalent to the code in the Manipulate with those parameter settings. In this case I get:

    DynamicModule[{x = 0}, 1/x]
    

    I can evaluate this and observe the Power::infy message in the notebook. In this particular example it is now
    clear what the problem is. In more complicated examples you can use the snap shot as a starting point to figure
    out what the problem might be.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

One may not always know the Type of an object at compile-time, but may
One of the things that has been talked about a few times on the
One of the hardest things for me to initially adjust to was my first
One of my biggest typographical frustrations about HTML is the way that it mangles
I'm trying my hardest to wrap my head around JavaScript closures. I get that
I have a very simple program that I am trying to improve performance. One
I really like Backbone, but I am having the hardest time doing what would
I'm learning Javascript via an online tutorial, but nowhere on that website or any
For me , the Pointer was one of the hardest concept in programming languages
UIScrollView programming seems one of the hardest task to me :( I have subviews

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.