diff --git a/docs/source/UsingXeus-Cpp.rst b/docs/source/UsingXeus-Cpp.rst index 5e2895e2..b834d63c 100644 --- a/docs/source/UsingXeus-Cpp.rst +++ b/docs/source/UsingXeus-Cpp.rst @@ -9,7 +9,3 @@ Using xeus-cpp xeus-cpp. Thereby you can write and execute C++ code interactively in this environment. -- Jupyter notebooks support magic commands (**%%python**) and inline code - execution for different languages. We use these features to run Python and C++ - code in separate cells to achieve interactive communication between them. - diff --git a/docs/source/debug.rst b/docs/source/debug.rst new file mode 100644 index 00000000..9992c1b4 --- /dev/null +++ b/docs/source/debug.rst @@ -0,0 +1,35 @@ +Debugging and Testing +-------------------- + +Debugging +======================== + +These steps are performed using the GNU Debugger (GDB), so ensure it is installed in your environment. Then execute the command to build the project. + +.. code-block:: bash + + cmake -D CMAKE_BUILD_TYPE=Debug .. + +In the same folder, run the command and copy the JSON displayed in the terminal. + +.. code-block:: bash + + xcpp + +Save the JSON in a new file in any folder. Before proceeding to the next step, ensure that Jupyter Console is installed in the environment. Open a new terminal and run the command in the folder where the JSON file is located. + +.. code-block:: bash + + jupyter console --existing yourJSONFile.json + +Open a new terminal, navigate to the build directory, and run GDB to start debugging. + +.. code-block:: bash + + gdb xcpp + + +Testing +======================== + +The testing code for the source files is located in `test/test_interpreter.cpp`. Write the necessary tests and build the project as described in the repository's README or contributing guidelines. Then, execute `build/test/test_xeus_cpp` to verify if the tests were successful. \ No newline at end of file diff --git a/docs/source/index.rst b/docs/source/index.rst index 785e27ba..3a7ee4b1 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -35,6 +35,7 @@ The Xeus-Cpp is a Jupyter kernel for the C++ programming language UsingXeus-Cpp tutorials dev-build-options + debug FAQ reference