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 7543065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:19:52+00:00 2026-05-30T08:19:52+00:00

What do you use for tracing and debugging in OCaml? For debugging I tried

  • 0

What do you use for tracing and debugging in OCaml?

For debugging I tried ocamldebug and the Emacs plugin.

For tracing I want to be able to print the data constructor of every variable.
An example using Camlp4 is shown here: http://caml.inria.fr/pub/docs/tutorial-camlp4/tutorial007.html#toc52

   type colour = Red | Green | Blue
   let print_colour =
     function
       Red -> print_string "Red"
     | Green -> print_string "Green"
     | Blue -> print_string "Blue"
  • 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-30T08:19:53+00:00Added an answer on May 30, 2026 at 8:19 am

    ocamldebug works fine when you can use bytecode.

    If you want to debug a native code application, there is a patch by Thomas gazagnaire on Mantis that allows to step line by line in the OCaml program using gdb. Parts of this patch should be integrated in the next version of OCaml (3.13 or 4.00).

    Currently, however, there is no way to print OCaml values, but another patch is coming, using GADT’s to define a generic printer function for any type.

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

Sidebar

Related Questions

I want to use tracing in my web application . please give an example.
I use a static variable for holding the count of objects. In constructor I
I want to add tracing capabilities to my messaging application. Each message I use
'''use Jython''' import shutil print dir(shutil) There is no, shutil.move, how does one move
I want to version my visual studio 2010 debug builds. I'm going to use
We initially didn't use any logging or debug tracing but after spending few weeks
Can I use tracing instead of my manual logging mechanism? Please recommend good references
I have come up with the following pointcut that I use for tracing method
It is possible to use the Entity framework caching and tracing framework with the
I thought I could use... studentID = myDataGid.selectedItem.studentID Does not want to work for

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.