Skip to content

Commit 0fda75f

Browse files
committed
doc: add a tip (for a vscode snippet)
1 parent 7c85fbc commit 0fda75f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

readme.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,17 @@ This works for the following samples:
5555
- <mark>/srv/www/web/app/themes/defaultspace/functions.php(605)</mark>: get_post_card(Object(WP_Post), Array)
5656
- PHP Fatal error: Uncaught TypeError: ..., called in <mark>C:\foo\bar/themes/defaultspace/functions.php on line 605</mark>
5757
- ... and defined in <mark>C:\foo\bar/themes/defaultspace/functions.php:63</mark>
58+
- ✨Tip: Use this (php) [snippet in vscode](https://code.visualstudio.com/docs/editor/userdefinedsnippets) (and enjoy the links):
59+
```json
60+
"Log to error log": {
61+
"prefix": "error_log",
62+
"body": [
63+
"error_log( \"$1\" . __FILE__ . ' on line ' . __LINE__ . \"\\n\" . print_r( $2, true ) );",
64+
"$4"
65+
],
66+
"description": "Log array/object to error log."
67+
}
68+
```
5869

5970
## Ideas
6071
- This was a single-file gui. As it went bigger we separated files (to improve readability). There could be a build-step which brings things back to a single file (like [adminer](https://github.com/vrana/adminer) uses).

0 commit comments

Comments
 (0)