Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

debug function

ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,211
I added a function (with overloads) called debug that you can call as follows:
debug(context, value);
within any feature will print the value to the console in some form and for certain types of value, display it in red while the feature is being edited. See https://demo-c.dev.onshape.com/FsDoc/library.html#module-debug.fs for the types you can and can't use.  Let me know if this helps and how it can be improved.
Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc

Comments

  • Emily_Qi_WangEmily_Qi_Wang Member Posts: 13 EDU
    The red-display aspect of the debug function wasn't working earlier this afternoon. The query results (i.e. # of things returned) were being printed out, though. We also tried it on the toy example of vector([0,1,0]) that was suggested by @kevin_o_toole_1. Kevin said he would look into it more but I can follow up with screenshots and more if requested.

    cc @Lauren_Froschauer
Sign In or Register to comment.