Skip to content

[lldb][docs] Update instructions for debugging API tests #89979

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

chelcassanova
Copy link
Contributor

This adds the option to use the breakpoint() keyword as a way to debug the API tests.

@llvmbot
Copy link
Member

llvmbot commented Apr 24, 2024

@llvm/pr-subscribers-lldb

Author: Chelsea Cassanova (chelcassanova)

Changes

This adds the option to use the breakpoint() keyword as a way to debug the API tests.


Full diff: https://github.com/llvm/llvm-project/pull/89979.diff

1 Files Affected:

  • (modified) lldb/docs/resources/test.rst (+1-1)
diff --git a/lldb/docs/resources/test.rst b/lldb/docs/resources/test.rst
index 2b0e9010fe280a..d90d7012f1c860 100644
--- a/lldb/docs/resources/test.rst
+++ b/lldb/docs/resources/test.rst
@@ -602,7 +602,7 @@ will cause the script to print out the pid of the test and wait for a while
 until a debugger is attached. Then run ``lldb -p <pid>`` to attach.
 
 To instead debug a test's python source, edit the test and insert
-``import pdb; pdb.set_trace()`` at the point you want to start debugging. In
+``import pdb; pdb.set_trace()`` or ``breakpoint()`` (Python 3 only) at the point you want to start debugging. In
 addition to pdb's debugging facilities, lldb commands can be executed with the
 help of a pdb alias. For example ``lldb bt`` and ``lldb v some_var``. Add this
 line to your ``~/.pdbrc``:

@medismailben
Copy link
Member

LGTM, although it would be good to mention that this could also be used for any LLDB python script, not only API tests.

@chelcassanova chelcassanova force-pushed the docs/update-debugging-api-tests branch from f1a0a1b to d0ed87f Compare April 24, 2024 23:40
This adds the option to use the `breakpoint()` keyword as a way to debug
the API tests.
@chelcassanova chelcassanova force-pushed the docs/update-debugging-api-tests branch from d0ed87f to 2328e73 Compare April 24, 2024 23:45
@chelcassanova chelcassanova merged commit 1b54805 into llvm:main Apr 25, 2024
@chelcassanova chelcassanova deleted the docs/update-debugging-api-tests branch April 25, 2024 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants