From 75900e6128d38f724c0c1d4c3eb5ce44afe58411 Mon Sep 17 00:00:00 2001 From: Clare Macrae Date: Tue, 13 Feb 2024 21:57:02 +0000 Subject: [PATCH] contrib: Add a page about debugging and performance tools Credit: @fevol --- contributing/Debugging/About Debugging.md | 6 +++++ .../Console logging facilities in Tasks.md | 6 +++++ .../Debugging and Performance tools.md | 26 +++++++++++++++++++ ... debugging and visualisation facilities.md | 2 ++ 4 files changed, 40 insertions(+) create mode 100644 contributing/Debugging/Debugging and Performance tools.md diff --git a/contributing/Debugging/About Debugging.md b/contributing/Debugging/About Debugging.md index 51b7dce8ff..9acca5e5ff 100644 --- a/contributing/Debugging/About Debugging.md +++ b/contributing/Debugging/About Debugging.md @@ -1,5 +1,7 @@ # Debugging +#debugging + ## Future Plans This section is intended to document how to place debugger breakpoints in the Tasks code, so that the behaviour can be inspected at run-time. @@ -7,4 +9,8 @@ This section is intended to document how to place debugger breakpoints in the Ta ## Current Content - [[Console logging facilities in Tasks]] + - About the Tasks plugin's logging mechanism. - [[How do I enable hidden debugging and visualisation facilities]] + - Enabling some debug rendering options in Tasks. +- [[Debugging and Performance tools]] + - Excellent guidance on debugging and profiling plugins. diff --git a/contributing/Debugging/Console logging facilities in Tasks.md b/contributing/Debugging/Console logging facilities in Tasks.md index 7013fbae49..6321654330 100644 --- a/contributing/Debugging/Console logging facilities in Tasks.md +++ b/contributing/Debugging/Console logging facilities in Tasks.md @@ -1,5 +1,11 @@ +--- +publish: true +--- + # Console logging facilities in Tasks +#debugging + The source file [src/lib/logging.ts](https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/src/lib/logging.ts) provides a logging facility that writes to the developer console. ## Enabling debug logging diff --git a/contributing/Debugging/Debugging and Performance tools.md b/contributing/Debugging/Debugging and Performance tools.md new file mode 100644 index 0000000000..9a04f03e76 --- /dev/null +++ b/contributing/Debugging/Debugging and Performance tools.md @@ -0,0 +1,26 @@ +--- +publish: true +--- + +# Debugging and Performance tools + +#debugging + +## Useful resources for debugging Obsidian plugins + +From user Fevol in [Discord](https://discord.com/channels/686053708261228577/840286264964022302/1171115922266800188): + +> [!Quote] +> The link below gives a short introduction to the debugging tools and code performance analyis tools available in Obsidian. It teaches you: +> +> Debugging: +> +> - [how to debug your code with the debugger tool](https://gist.github.com/Fevol/b672865d61e54ac6f61e7c88aa05ba42#debugging-your-code) +> +> Performance: +> +> - [how to time the execution of your code](https://gist.github.com/Fevol/b672865d61e54ac6f61e7c88aa05ba42#timing-your-code) +> - [how to create flame charts](https://gist.github.com/Fevol/b672865d61e54ac6f61e7c88aa05ba42#flame-charts-firechart_with_upwards_trend) +> - [how to interpret flame charts to evaluate performance](https://gist.github.com/Fevol/b672865d61e54ac6f61e7c88aa05ba42#interpreting-your-flame-chart) +> +> (Suggestions, PR's, etc. are very welcome) [https://gist.github.com/Fevol/b672865d61e54ac6f61e7c88aa05ba42](https://gist.github.com/Fevol/b672865d61e54ac6f61e7c88aa05ba42 "https://gist.github.com/Fevol/b672865d61e54ac6f61e7c88aa05ba42") diff --git a/contributing/Debugging/How do I enable hidden debugging and visualisation facilities.md b/contributing/Debugging/How do I enable hidden debugging and visualisation facilities.md index 6d9cbe33d5..0b039950e6 100644 --- a/contributing/Debugging/How do I enable hidden debugging and visualisation facilities.md +++ b/contributing/Debugging/How do I enable hidden debugging and visualisation facilities.md @@ -1,5 +1,7 @@ # How do I enable hidden debugging/visualisation facilities? +#debugging + > [!Released] > Introduced in Tasks 1.26.0.