From cc131a3319cc7dcc469b465d016949037541cff8 Mon Sep 17 00:00:00 2001 From: equiman Date: Fri, 9 Dec 2022 11:17:14 -0500 Subject: [PATCH] add snippets for experimental console.profile --- CHANGELOG.md | 6 ++++++ README.md | 3 +++ package.json | 2 +- snippets/code.json | 19 +++++++++++++++++++ 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9e25b7..6bbeeff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,12 @@ Fixed for any bug fixes. Security to invite users to upgrade in case of vulnerabilities. --> +## [1.2.0] - 2022/12/09 + +### Added + +- Experimental console.profile added as snippet + ## [1.1.1] - 2022/07/29 ### Fixed diff --git a/README.md b/README.md index f1f2e83..a60e5a2 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,9 @@ Below is a list of all available snippets and the triggers of each one. The **$* | `ctr→` | [trace](https://developer.mozilla.org/en-US/docs/Web/API/Console/trace) | `console.trace($name)█` | | `cc→` | [count](https://developer.mozilla.org/en-US/docs/Web/API/Console/count) | `console.count($label)█` | | `ccr→` | [count reset](https://developer.mozilla.org/en-US/docs/Web/API/Console/countReset) | `console.countReset($label)█` | +| `cps→` | [profile start](https://developer.mozilla.org/en-US/docs/Web/API/console/profile) | `console.profile()█` | +| `cpe→` | [profile end](https://developer.mozilla.org/en-US/docs/Web/API/console/profileEnd) | `console.profileEnd()█` | +| `cpw→` | profile wrapper | console.profile()

console.profileEnd()
| | `cts→` | [time start](https://developer.mozilla.org/en-US/docs/Web/API/Console/time) | `console.time($label)█` | | `ctl→` | [time log](https://developer.mozilla.org/en-US/docs/Web/API/console/timeLog) | `console.timeLog($label)█` | | `cte→` | [time end](https://developer.mozilla.org/en-US/docs/Web/API/console/timeEnd) | `console.timeEnd($label)█` | diff --git a/package.json b/package.json index f7d5d6c..7bab0ef 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "debug-snippets", "description": "VS Code Debug snippets for JS, TS and CSS", - "version": "1.1.1", + "version": "1.2.0", "displayName": "Debug Snippets", "publisher": "deinsoftware", "icon": "images/light-icon.png", diff --git a/snippets/code.json b/snippets/code.json index b51ff64..1e949cf 100644 --- a/snippets/code.json +++ b/snippets/code.json @@ -139,6 +139,25 @@ "body": "console.countReset('${1:label}')$0", "description": "Console Count Reset" }, + "consoleProfileStart": { + "prefix": "cps", + "body": "console.profile()$0", + "description": "Console Profile Start" + }, + "consoleProfileEnd": { + "prefix": "cpe", + "body": "console.profileEnd('${1:label}')$0", + "description": "Console Profile End" + }, + "consoleProfileWrapper": { + "prefix": "cpw", + "body": [ + "console.profile()", + "$0", + "console.profileEnd()" + ], + "description": "Console Time Wrapper" + }, "consoleTimeStart": { "prefix": "cts", "body": "console.time('${1:label}')$0",