baldurk
6b02191629
Try to break potential deadlock between UI and replay threads
...
* During capture shutdown on Python < 3.13 the replay thread will try to remove
itself as a debuggable thread which requires being able to run python (holding
the GIL). If the UI thread is the one triggering the capture shutdown and is
running a call from a python script it may hold the GIL while waiting for the
replay thread to close, deadlocking.
* To alleviate this, while the UI thread is about to block on the replay thread
we try to release the python state if we are holding it so that the replay
thread can run python code if needed.
* We already do this in a manual wrapper around BlockInvoke.
2026-08-31 11:13:35 +01:00
baldurk
a1b76c231e
Improve the workflow for extensions that fail on import
2026-08-28 15:46:23 +01:00
baldurk
45b5f1ad1d
Remove debug print
2026-08-27 16:34:36 +01:00
baldurk
fa5af1bf7c
Remove extra )
2026-08-27 15:29:03 +01:00
baldurk
d015c0619a
Fix race when initialising help context
2026-08-27 15:27:09 +01:00
baldurk
b100e05053
Add autocomplete for python help entry
2026-08-27 13:43:14 +01:00
baldurk
9a2ec4aa19
Use python invoker wrapper everywhere for pyrenderdoc
...
* This includes in the parameters of extension callbacks.
2026-08-27 12:45:52 +01:00
baldurk
928cfcd80a
Ensure python compile error exceptions get handled properly
2026-08-27 12:42:57 +01:00
baldurk
b3710eba3b
Fetch & display tooltips for each entry along with autocomplete options
2026-08-13 21:05:14 +01:00
baldurk
022a5e1438
Change python scripting 'debug' button to just attach, not run
2026-08-13 21:05:14 +01:00
baldurk
810e6a79d2
Run scripts in their place when they are on disk
...
* We only write the pytmp/script.py for unsaved scripts, so they can be
recovered.
2026-08-13 21:05:14 +01:00
baldurk
bb4017a965
Add a spellchecking mode for sphinx and fix some typos
...
* The worst one was Persistant -> Persistent. This involved renaming
PersistentConfig but the impact of that is considered minimal enough to be
worth fixing.
2026-08-13 17:46:47 +01:00
baldurk
e6cd4d2e98
Add an entry to the recent files list for unsaved/temp recovery script
2026-08-13 17:46:45 +01:00
baldurk
21ebe7e6cc
When reloading an extension send errors to its output channel
2026-08-13 17:46:44 +01:00
baldurk
16a24406b2
In python extensions, set pyrenderdoc global before calling register()
2026-08-13 17:46:44 +01:00
baldurk
c97850e39b
Allow customisation of VS Code executable
2026-08-13 17:46:44 +01:00
baldurk
ca0ac6157a
Fix some issues with reference counting on python objects
2026-08-13 17:46:44 +01:00
baldurk
88782bea97
Use reflection script for autocomplete and help in python shell
...
* Also add syntax checking via parse attempts.
2026-08-13 17:46:43 +01:00
baldurk
09c036bd36
Embed and initialise reflection script in python context
2026-08-13 17:46:42 +01:00
baldurk
23ca2cf053
Show syntax errors when editing in python script editor
2026-08-13 17:46:41 +01:00
baldurk
02ead51303
Add a status entry showing loaded python extensions & debugger status
2026-08-13 17:46:40 +01:00
baldurk
3c6dfd23b4
Add a drop-down for the script output panel to switch context
...
* By default we still display all messages, but this allows users to switch to
just seeing the output from one extension if desired.
2026-08-13 17:46:40 +01:00
baldurk
768d8fa615
Add a static context for connecting Qt signals for python extensions
2026-08-13 17:46:40 +01:00
baldurk
b1f0b9d310
Flush output before an exception
...
* We buffer output to avoid spamming huge numbers of signals especially when
single lines can be many write calls. This means if an exception is processed
immediately after a print the output from the print may come after the
extension.
2026-08-13 17:46:40 +01:00
baldurk
229c4c8746
Avoid polluting globals with completion objects
2026-08-13 17:46:40 +01:00
baldurk
60b989f2b7
Give extensions their own OutputRedirector object to identify them
2026-08-13 17:46:40 +01:00
baldurk
3ff393c91f
Add option to launch/wait for debugger on python contexts
2026-08-13 17:46:40 +01:00
baldurk
3dfd829331
Initialise debugpy on a thread to reduce startup time
2026-08-13 17:46:40 +01:00
baldurk
d71827d6a1
Load debugpy when possible to allow python debugging in-program
2026-08-13 17:46:39 +01:00
baldurk
9fc3c3cdcd
Use sys.settrace instead of PyEval_SetTrace for better compatibility
2026-08-13 17:46:39 +01:00
baldurk
965d788fe5
Add a settings window entry to add extra python stubs paths
2026-08-13 17:46:39 +01:00
baldurk
26a84363b8
Embed stubsgen.py and automatically generate stubs into user folder
...
* We create both a stubs folder for each specific version, and a 'latest' that
is updated by newer RD versions.
* For development, the stubs will be regenerated any time the git commit hash
changes for development builds.
2026-08-13 17:46:39 +01:00
baldurk
7567cc11c9
Fix GC collection of python contexts
2026-08-13 17:46:38 +01:00
baldurk
75ecc6ea1a
Return internal handle from sys
2026-05-15 13:15:45 +01:00
baldurk
403725f69f
Check global handle from correct object in extension loading
2026-03-13 18:21:33 +00:00
baldurk
fc85e44a06
Output stderr as warnings, not necessarily errors
2026-03-13 13:07:44 +00:00
baldurk
a72ea34c6c
Don't use sys.stdout to find global handle
...
* Instead store sys._renderdoc_internal that won't be overwritten.
2026-03-13 13:07:44 +00:00
baldurk
856c838def
Update copyright years to 2026 and fix copyright ranges
...
* In a previous update in 2021 many copyright ranges were truncated
accidentally, and some files have been copy-pasted with wrong years. These
dates have been fixed based on git history and original copyright messages.
2026-01-05 14:17:28 +00:00
Jake Turner
39c7dc1027
Fix python message handling reading out of bounds read
2025-09-24 15:47:14 +01:00
baldurk
2322e165de
Update copyright years to 2025
2025-03-14 18:54:37 +00:00
baldurk
a9cc63904e
Catch and print errors properly if unregister() fails
2025-02-21 13:46:59 +00:00
baldurk
783e7d47a5
Make python extension loading more robust to missing register/unregister
2025-02-21 13:46:59 +00:00
baldurk
d5cc1cf626
Import threading on python context startup on main thread for debuggers
2024-07-15 16:22:38 +01:00
kb1000
bb7ec408cb
Use pythoncapi-compat to simplify Python C API backwards compatibility
2024-04-08 10:57:28 +01:00
kb1000
d0a24b31cd
Fix some deprecated and internal Python C API usages
2024-04-08 10:57:28 +01:00
baldurk
9f4f0e6aa1
Update copyright years to 2024
2024-02-12 11:04:52 +00:00
baldurk
9d39b8e1a8
Reformat code for clang-format 15
2023-09-05 11:02:08 +01:00
baldurk
d47e79ae07
Update copyright years to 2023
2023-02-01 12:23:32 +00:00
baldurk
2cf7b911c7
Fix refcounting issue with python frame objects
2022-11-09 12:20:48 +00:00
baldurk
9df7d40241
Fix compilation on python version update on mac CI
2022-11-02 12:22:33 +00:00