Skip to content

Commit 3da9eac

Browse files
authored
simplified debugging start (#3)
Updated office-addin-debugging package to v2.0.0 which supports reading package.json config for values rather than requiring command line options to be set. Allows the appType to be set so that the debugging start command can do the appropriate thing for each type of app.
1 parent f0c6ea0 commit 3da9eac

File tree

4 files changed

+129
-132
lines changed

4 files changed

+129
-132
lines changed

.vscode/launch.json

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@
99
"type": "node",
1010
"request": "launch",
1111
"runtimeExecutable": "npm",
12-
"runtimeArgs": [
13-
"run-script",
14-
"start-desktop"
15-
],
12+
"runtimeArgs": ["run-script", "start", "desktop"]
1613
},
1714
{
1815
"name": "Office Online (Edge)",
@@ -28,10 +25,9 @@
2825
],
2926
"inputs": [
3027
{
31-
"id": "officeOnlineDocumentUrl",
32-
"type": "promptString",
33-
"description": "Please enter the url for the Office Online document.",
28+
"id": "officeOnlineDocumentUrl",
29+
"type": "promptString",
30+
"description": "Please enter the url for the Office Online document."
3431
}
35-
],
36-
37-
}
32+
]
33+
}

.vscode/tasks.json

Lines changed: 84 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,85 @@
11
{
2-
// See https://go.microsoft.com/fwlink/?LinkId=733558
3-
// for the documentation about the tasks.json format
4-
"version": "2.0.0",
5-
"tasks": [
6-
{
7-
"label": "Build (Development)",
8-
"type": "npm",
9-
"script": "build-dev",
10-
"group": {
11-
"kind": "build",
12-
"isDefault": true
13-
},
14-
"presentation": {
15-
"clear": true,
16-
"panel": "shared",
17-
"showReuseMessage": false
18-
}
19-
},
20-
{
21-
"label": "Build (Production)",
22-
"type": "npm",
23-
"script": "build",
24-
"group": "build",
25-
"presentation": {
26-
"clear": true,
27-
"panel": "shared",
28-
"showReuseMessage": false
29-
}
30-
},
31-
{
32-
"label": "Debug: Desktop",
33-
"type": "npm",
34-
"script": "start-desktop",
35-
"presentation": {
36-
"clear": true,
37-
"panel": "shared",
38-
"showReuseMessage": false
39-
},
40-
"problemMatcher": []
41-
},
42-
{
43-
"label": "Debug: Web",
44-
"type": "npm",
45-
"script": "start-web",
46-
"presentation": {
47-
"clear": true,
48-
"panel": "shared",
49-
"showReuseMessage": false
50-
},
51-
"problemMatcher": []
52-
},
53-
{
54-
"label": "Dev Server",
55-
"type": "npm",
56-
"script": "dev-server",
57-
"presentation": {
58-
"clear": true,
59-
"panel": "dedicated",
60-
},
61-
"problemMatcher": []
62-
},
63-
{
64-
"label": "Install",
65-
"type": "npm",
66-
"script": "install",
67-
"presentation": {
68-
"clear": true,
69-
"panel": "shared",
70-
"showReuseMessage": false
71-
},
72-
"problemMatcher": []
73-
},
74-
{
75-
"label": "Stop Debug",
76-
"type": "npm",
77-
"script": "stop",
78-
"presentation": {
79-
"clear": true,
80-
"panel": "shared",
81-
"showReuseMessage": false
82-
},
83-
"problemMatcher": []
84-
},
85-
{
86-
"label": "Watch",
87-
"type": "npm",
88-
"script": "watch",
89-
"presentation": {
90-
"clear": true,
91-
"panel": "dedicated",
92-
},
93-
"problemMatcher": []
94-
}
95-
]
96-
}
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "Build (Development)",
8+
"type": "npm",
9+
"script": "build-dev",
10+
"group": {
11+
"kind": "build",
12+
"isDefault": true
13+
},
14+
"presentation": {
15+
"clear": true,
16+
"panel": "shared",
17+
"showReuseMessage": false
18+
}
19+
},
20+
{
21+
"label": "Build (Production)",
22+
"type": "npm",
23+
"script": "build",
24+
"group": "build",
25+
"presentation": {
26+
"clear": true,
27+
"panel": "shared",
28+
"showReuseMessage": false
29+
}
30+
},
31+
{
32+
"label": "Debug: Web",
33+
"type": "npm",
34+
"script": "start:web",
35+
"presentation": {
36+
"clear": true,
37+
"panel": "shared",
38+
"showReuseMessage": false
39+
},
40+
"problemMatcher": []
41+
},
42+
{
43+
"label": "Dev Server",
44+
"type": "npm",
45+
"script": "dev-server",
46+
"presentation": {
47+
"clear": true,
48+
"panel": "dedicated"
49+
},
50+
"problemMatcher": []
51+
},
52+
{
53+
"label": "Install",
54+
"type": "npm",
55+
"script": "install",
56+
"presentation": {
57+
"clear": true,
58+
"panel": "shared",
59+
"showReuseMessage": false
60+
},
61+
"problemMatcher": []
62+
},
63+
{
64+
"label": "Stop Debug",
65+
"type": "npm",
66+
"script": "stop",
67+
"presentation": {
68+
"clear": true,
69+
"panel": "shared",
70+
"showReuseMessage": false
71+
},
72+
"problemMatcher": []
73+
},
74+
{
75+
"label": "Watch",
76+
"type": "npm",
77+
"script": "watch",
78+
"presentation": {
79+
"clear": true,
80+
"panel": "dedicated"
81+
},
82+
"problemMatcher": []
83+
}
84+
]
85+
}

package-lock.json

Lines changed: 29 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,19 @@
66
"url": "https://github.com/OfficeDev/Office-Addin-TaskPane.git"
77
},
88
"license": "MIT",
9+
"config": {
10+
"app-type-to-debug": "desktop",
11+
"dev-server-port": 3000
12+
},
913
"scripts": {
1014
"build": "webpack -p --mode production",
1115
"build-dev": "webpack --mode development",
1216
"dev-server": "webpack-dev-server --mode development",
1317
"sideload": "office-toolbox sideload -m manifest.xml -a excel",
14-
"start": "npm run start-desktop",
15-
"start-desktop": "office-addin-debugging start manifest.xml --dev-server \"npm run dev-server\" --dev-server-port 3000 --sideload \"npm run sideload\" --no-live-reload",
16-
"start-web": "office-addin-debugging start manifest.xml --dev-server \"npm run dev-server\" --dev-server-port 3000 --no-debug --no-live-reload",
17-
"stop": "office-addin-debugging stop manifest.xml --unload \"npm run unload\"",
18+
"start": "office-addin-debugging start manifest.xml",
19+
"start:desktop": "office-addin-debugging start manifest.xml desktop",
20+
"start:web": "office-addin-debugging start manifest.xml web",
21+
"stop": "office-addin-debugging stop manifest.xml",
1822
"unload": "office-toolbox remove -m manifest.xml -a excel",
1923
"validate": "office-toolbox validate -m manifest.xml",
2024
"watch": "webpack --mode development --watch"
@@ -38,8 +42,8 @@
3842
"fs": "0.0.1-security",
3943
"html-loader": "^0.5.5",
4044
"html-webpack-plugin": "^3.2.0",
41-
"office-addin-debugging": "^1.4.0",
42-
"office-toolbox": "^0.1.0",
45+
"office-addin-debugging": "^2.0.0",
46+
"office-toolbox": "^0.1.1",
4347
"source-map-loader": "^0.2.4",
4448
"ts-loader": "^5.3.1",
4549
"typescript": "^3.1.6",

0 commit comments

Comments
 (0)