forked from elazarcoh/simply-view-image-for-python-debugging
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
367 lines (367 loc) · 11 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
{
"name": "simply-view-image-for-python-debugging",
"displayName": "View Image for Python Debugging",
"description": "simply view the image of the image variables when debugging python",
"version": "2.99.1",
"publisher": "elazarcoh",
"icon": "icon.png",
"preview": false,
"engines": {
"vscode": "^1.63.0"
},
"repository": {
"type": "git",
"url": "https://github.com/elazarcoh/simply-view-image-for-python-debugging"
},
"categories": [
"Other"
],
"keywords": [
"Python",
"image",
"debug",
"plot",
"view"
],
"activationEvents": [
"onDebugResolve:python",
"onDebugResolve:Python Kernel Debug Adapter",
"onCommand:svifpd.open-settings"
],
"main": "./dist/extension.js",
"contributes": {
"commands": [
{
"command": "svifpd.view-image-track",
"title": "Track Image",
"enablement": "inDebugMode",
"category": "Debug View Python"
},
{
"command": "svifpd.view-image",
"title": "View Image",
"enablement": "inDebugMode",
"category": "Debug View Python"
},
{
"command": "svifpd.watch-view-image",
"title": "View Image",
"enablement": "inDebugMode",
"icon": {
"light": "resources/light/image.svg",
"dark": "resources/dark/image.svg"
}
},
{
"command": "svifpd.watch-view-plot",
"title": "View Plot",
"enablement": "inDebugMode",
"icon": "$(graph)"
},
{
"command": "svifpd.watch-view-tensor",
"title": "View Tensor",
"enablement": "inDebugMode",
"icon": {
"light": "resources/light/tensor.svg",
"dark": "resources/dark/tensor.svg"
}
},
{
"command": "svifpd.watch-track-enable",
"title": "Track - Enable",
"enablement": "inDebugMode",
"icon": "$(eye)"
},
{
"command": "svifpd.watch-track-disable",
"title": "Track - Disable",
"enablement": "inDebugMode",
"icon": "$(eye-closed)"
},
{
"command": "svifpd.watch-refresh",
"title": "Refresh",
"enablement": "inDebugMode",
"icon": "$(timeline-refresh)"
},
{
"command": "svifpd.open-settings",
"title": "Configure...",
"icon": "$(settings-gear)"
},
{
"command": "svifpd.update-frame-id",
"title": "Update Frame ID",
"enablement": "inDebugMode",
"category": "Debug View Python"
},
{
"command": "svifpd.view-debug-variable",
"title": "View as Image",
"enablement": "inDebugMode"
},
{
"command": "svifpd.add-expression",
"title": "Add Expression",
"category": "Debug View Python"
},
{
"command": "svifpd.edit-expression",
"title": "Edit Expression",
"icon": "$(edit)"
},
{
"command": "svifpd.remove-expression",
"title": "Remove Expression",
"icon": "$(close)"
},
{
"command": "svifpd.remove-all-expressions",
"title": "Remove All Expression",
"icon": "$(close-all)"
}
],
"menus": {
"commandPalette": [
{
"command": "svifpd.watch-view-image",
"when": "false"
},
{
"command": "svifpd.watch-view-plot",
"when": "false"
},
{
"command": "svifpd.watch-view-tensor",
"when": "false"
},
{
"command": "svifpd.watch-track-enable",
"when": "false"
},
{
"command": "svifpd.watch-track-disable",
"when": "false"
},
{
"command": "svifpd.watch-refresh",
"when": "false"
},
{
"command": "svifpd.open-settings",
"when": "false"
},
{
"command": "svifpd.view-debug-variable",
"when": "false"
},
{
"command": "svifpd.edit-expression",
"when": "false"
},
{
"command": "svifpd.remove-expression",
"when": "false"
},
{
"command": "svifpd.remove-all-expressions",
"when": "false"
}
],
"view/title": [
{
"command": "svifpd.watch-refresh",
"when": "view == pythonDebugImageWatch",
"group": "navigation@10"
},
{
"command": "svifpd.remove-all-expressions",
"when": "view == pythonDebugImageWatch",
"group": "navigation@20"
},
{
"command": "svifpd.open-settings",
"when": "view == pythonDebugImageWatch",
"group": "navigation@30"
}
],
"debug/variables/context": [
{
"command": "svifpd.view-debug-variable",
"group": "1_view",
"when": "debugProtocolVariableMenuContext == viewableInGraphicViewer"
}
],
"view/item/context": [
{
"command": "svifpd.watch-view-image",
"when": "view == pythonDebugImageWatch && viewItem =~ /svifpd:nonTrackedVariable-.*?image.*/ || view == pythonDebugImageWatch && viewItem =~ /svifpd:trackedVariable-.*?image.*/",
"group": "inline@11"
},
{
"command": "svifpd.watch-view-plot",
"when": "view == pythonDebugImageWatch && viewItem =~ /svifpd:nonTrackedVariable-.*?plot.*/ || view == pythonDebugImageWatch && viewItem =~ /svifpd:trackedVariable-.*?plot.*/",
"group": "inline@12"
},
{
"command": "svifpd.watch-view-tensor",
"when": "view == pythonDebugImageWatch && viewItem =~ /svifpd:nonTrackedVariable-.*?tensor.*/ || view == pythonDebugImageWatch && viewItem =~ /svifpd:trackedVariable-.*?tensor.*/",
"group": "inline@13"
},
{
"command": "svifpd.watch-track-enable",
"when": "view == pythonDebugImageWatch && viewItem =~ /svifpd:nonTrackedVariable-.*/",
"group": "inline@30"
},
{
"command": "svifpd.watch-track-disable",
"when": "view == pythonDebugImageWatch && viewItem =~ /svifpd:trackedVariable-.*/",
"group": "inline@31"
},
{
"command": "svifpd.edit-expression",
"when": "view == pythonDebugImageWatch && viewItem =~ /svifpd:.*-expressionItem/",
"group": "inline@20"
},
{
"command": "svifpd.remove-expression",
"when": "view == pythonDebugImageWatch && viewItem =~ /svifpd:.*-expressionItem/",
"group": "inline@21"
}
]
},
"views": {
"debug": [
{
"id": "pythonDebugImageWatch",
"name": "Image Watch",
"icon": "eye",
"visibility": "visible",
"type": "tree"
}
]
},
"keybindings": [
{
"command": "svifpd.view-image",
"key": "ctrl+alt+q",
"when": "inDebugMode"
}
],
"configuration": {
"title": "View Image (Python Debug)",
"properties": {
"svifpd.addViewContextEntryToVSCodeDebugVariables": {
"type": "boolean",
"default": true,
"description": "Whether to show a context menu entry in VSCode debug variables view for custom objects (currently only plots)."
},
"svifpd.customSavePath": {
"type": "string",
"description": "Custom path to save images. Only used if `svifpd.saveLocation` is set to `custom`."
},
"svifpd.debug": {
"type": "string",
"enum": [
"none",
"debug",
"verbose"
],
"default": "none",
"description": "Enable debug mode (show debug info in `View Image for Python` output)"
},
"svifpd.matplotlibUseAgg": {
"type": "boolean",
"default": false,
"description": "Whether to run matplotlib.use('agg') to avoid display error. Can be useful for working remotely over ssh etc."
},
"svifpd.normalizationMethod": {
"type": "string",
"enum": [
"normalize",
"skimage.img_as_ubyte",
"None"
],
"enumDescriptions": [
"First subtracts the minimal value, and then scale the values between [0, 255]",
"Negative input values will be clipped. Positive values are scaled between 0 and 255.",
"Image saved as is, behavior as specified for the backend."
],
"default": "normalize",
"description": "Image normalization method: The image pixels must be in [0, 255] to be saved correctly. For that, we perform a normalization before save is being called. For more information, see the description for each method."
},
"svifpd.preferredBackend": {
"type": "string",
"enum": [
"opencv",
"imageio",
"Pillow",
"Standalone"
],
"default": "Standalone",
"description": "Preferred backend package to save the image with. Automatically falls back to one of the other."
},
"svifpd.restrictImageTypes": {
"type": "boolean",
"default": true,
"description": "Restrict image types to numpy.ndarray/PIL.Image only"
},
"svifpd.saveLocation": {
"type": "string",
"enum": [
"tmp",
"extensionStorage",
"custom"
],
"default": "tmp",
"description": "Location to save images."
},
"svifpd.useTmpPathToSave": {
"type": "boolean",
"default": true,
"description": "Use the system tmp path to save image otherwise use the storage path.",
"deprecated": true,
"deprecationMessage": "Use `svifpd.saveLocation` instead."
}
}
}
},
"scripts": {
"update-package-json": "update-package-json",
"vscode:prepublish": "yarn run clean && webpack --config webpack.config.prod.js",
"build": " webpack --mode development",
"watch": "webpack --mode development --watch",
"lint": "eslint src --ext ts",
"clean": "rimraf dist"
},
"devDependencies": {
"@types/glob": "^8.0.0",
"@types/mocha": "^10.0.1",
"@types/node": "^18.11.15",
"@types/parsimmon": "^1.10.6",
"@types/tmp": "^0.2.1",
"@types/vscode": "^1.60.0",
"@typescript-eslint/eslint-plugin": "^5.47.0",
"@typescript-eslint/parser": "^5.47.0",
"@typescript-eslint/typescript-estree": "^5.47.0",
"@vscode/debugprotocol": "^1.49.0",
"eslint": "^8.30.0",
"eslint-webpack-plugin": "^3.0.1",
"glob": "^8.0.3",
"rimraf": "^3.0.2",
"ts-loader": "^9.4.2",
"ts-node": "^10.9.1",
"typescript": "^4.9.4",
"webpack": "^5.50.0",
"webpack-cli": "^5.0.1"
},
"dependencies": {
"parsimmon": "^1.18.1",
"reflect-metadata": "^0.1.13",
"tmp": "^0.2.1",
"typedi": "^0.10.0",
"vscode-debugprotocol": "^1.49.0",
"vscode-extensions-json-generator": "^0.1.5"
}
}