.. index:: 
	single: The Trace Library and the Interactive Debugger; Introduction

==============================================
The Trace Library and the Interactive Debugger
==============================================

In this chapter we will learn about the Trace Library and the Interactive Debugger

.. index:: 
	pair: The Trace Library and the Interactive Debugger; Loading the Trace library

Loading the Trace library
=========================

To start using the Trace library, We must load it first!

.. code-block:: ring

	load "tracelib.ring"

.. index:: 
	pair: The Trace Library and the Interactive Debugger; Trace All Events

Trace All Events
================

The next example demonstrates the Trace library usage to trace all events.

... code-block:: ring

	# Trace All Events
	trace(:AllEvents)

	see "Hello, world!" + nl
	see "Welcome" + nl
	see "How are you?" +nl

	mytest()

	new myclass { mymethod() }

	func mytest
		see "Message from mytest" + nl

	class myclass
		func mymethod
			see "Message from mymethod" + nl



.. index:: 
	single: The Trace Library and the Interactive Debugger; Introduction

==============================================
The Trace Library and the Interactive Debugger
==============================================

In this chapter we will learn about the Trace Library and the Interactive Debugger

.. index:: 
	pair: The Trace Library and the Interactive Debugger; Loading the Trace library

Loading the Trace library
=========================

To start using the Trace library, We must load it first!

.. code-block:: ring

	load "tracelib.ring"

.. index:: 
	pair: The Trace Library and the Interactive Debugger; Trace All Events

Trace All Events
================

The next example demonstrates the Trace library usage to trace all events.

... code-block:: ring

	# Trace All Events
	trace(:AllEvents)

	see "Hello, world!" + nl
	see "Welcome" + nl
	see "How are you?" +nl

	mytest()

	new myclass { mymethod() }

	func mytest
		see "Message from mytest" + nl

	class myclass
		func mymethod
			see "Message from mymethod" + nl


.. index:: 
	pair: The Trace Library and the Interactive Debugger; Trace control flow between functions

Trace control flow between functions
====================================

The next example demonstrates the Trace library usage 
to trace the control flow between functions.

.. code-block:: ring

	Trace(:Functions)

	test1()

	func test1
		see :test1 + nl
		test2()

	func test2
		see :test2 + nl
		see test3() + nl

	func test3
		see :test3 + nl
		return "test 3 output" 
	


Update Documentation - Trace control flow between functions
Update Documentation - Trace control flow between functions
