Skip to content

Commit a7aa501

Browse files
authored
Merge pull request #5 from deinsoftware/dev
add snippets for experimental console.profile
2 parents bc89a4e + cc131a3 commit a7aa501

File tree

4 files changed

+29
-1
lines changed

4 files changed

+29
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ Fixed for any bug fixes.
99
Security to invite users to upgrade in case of vulnerabilities.
1010
-->
1111

12+
## [1.2.0] - 2022/12/09
13+
14+
### Added
15+
16+
- Experimental console.profile added as snippet
17+
1218
## [1.1.1] - 2022/07/29
1319

1420
### Fixed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ Below is a list of all available snippets and the triggers of each one. The **$*
9999
| `ctr→` | [trace](https://developer.mozilla.org/en-US/docs/Web/API/Console/trace) | `console.trace($name)█` |
100100
| `cc→` | [count](https://developer.mozilla.org/en-US/docs/Web/API/Console/count) | `console.count($label)█` |
101101
| `ccr→` | [count reset](https://developer.mozilla.org/en-US/docs/Web/API/Console/countReset) | `console.countReset($label)█` |
102+
| `cps→` | [profile start](https://developer.mozilla.org/en-US/docs/Web/API/console/profile) | `console.profile()█` |
103+
| `cpe→` | [profile end](https://developer.mozilla.org/en-US/docs/Web/API/console/profileEnd) | `console.profileEnd()█` |
104+
| `cpw→` | profile wrapper | <code>console.profile()<br/>█<br/>console.profileEnd()</code> |
102105
| `cts→` | [time start](https://developer.mozilla.org/en-US/docs/Web/API/Console/time) | `console.time($label)█` |
103106
| `ctl→` | [time log](https://developer.mozilla.org/en-US/docs/Web/API/console/timeLog) | `console.timeLog($label)█` |
104107
| `cte→` | [time end](https://developer.mozilla.org/en-US/docs/Web/API/console/timeEnd) | `console.timeEnd($label)█` |

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "debug-snippets",
33
"description": "VS Code Debug snippets for JS, TS and CSS",
4-
"version": "1.1.1",
4+
"version": "1.2.0",
55
"displayName": "Debug Snippets",
66
"publisher": "deinsoftware",
77
"icon": "images/light-icon.png",

snippets/code.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,25 @@
139139
"body": "console.countReset('${1:label}')$0",
140140
"description": "Console Count Reset"
141141
},
142+
"consoleProfileStart": {
143+
"prefix": "cps",
144+
"body": "console.profile()$0",
145+
"description": "Console Profile Start"
146+
},
147+
"consoleProfileEnd": {
148+
"prefix": "cpe",
149+
"body": "console.profileEnd('${1:label}')$0",
150+
"description": "Console Profile End"
151+
},
152+
"consoleProfileWrapper": {
153+
"prefix": "cpw",
154+
"body": [
155+
"console.profile()",
156+
"$0",
157+
"console.profileEnd()"
158+
],
159+
"description": "Console Time Wrapper"
160+
},
142161
"consoleTimeStart": {
143162
"prefix": "cts",
144163
"body": "console.time('${1:label}')$0",

0 commit comments

Comments
 (0)