File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,14 @@ or passing relevant ``filenames`` in addition to source and output directory in
167167
168168__ https://github.com/sphinx-doc/sphinx-autobuild/issues/34
169169
170+ Debugging
171+ =========
172+
173+ If the ``SPHINX_AUTOBUILD_DEBUG `` environment variable is present
174+ and a file change is detected,
175+ its path and the currently active ignore expressions are printed.
176+ This is to help setting up the ignore expressions correctly.
177+
170178Acknowledgements
171179================
172180
Original file line number Diff line number Diff line change 33from __future__ import annotations
44
55import fnmatch
6+ import os
67import re
78from pathlib import Path
89
@@ -23,6 +24,11 @@ def __repr__(self):
2324 def __call__ (self , filename : str , / ):
2425 """Determine if 'path' should be ignored."""
2526 normalised_path = Path (filename ).resolve ().as_posix ()
27+ if "SPHINX_AUTOBUILD_DEBUG" in os .environ :
28+ print (
29+ f"SPHINX_AUTOBUILD_DEBUG: { normalised_path !r} has changed; "
30+ f"ignores are { self } "
31+ )
2632 # Any regular pattern matches.
2733 for pattern in self .regular_patterns :
2834 # separators are normalised before creating the IgnoreFilter
You can’t perform that action at this time.
0 commit comments