Skip to content

Commit 59a570d

Browse files
Make the demo app debuggable
1 parent 7081b95 commit 59a570d

File tree

9 files changed

+45
-1041
lines changed

9 files changed

+45
-1041
lines changed

.vscode/launch.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,16 @@
99
"preLaunchTask": "build-tests",
1010
"enableDebuggerAutoRecovery": true,
1111
"stopDebuggerOnAppExit": true,
12-
"enableVariablesPanel": false,
1312
"injectRaleTrackerTask": false,
1413
"enableDebugProtocol": true
1514
}, {
1615
"name": "Demo App",
1716
"type": "brightscript",
1817
"request": "launch",
19-
"rootDir": "${workspaceFolder}/demos/simple-brightscript",
18+
"rootDir": "${workspaceFolder}/dist/demos/simple-brightscript",
19+
"preLaunchTask": "build-demo-app",
2020
"enableDebuggerAutoRecovery": true,
2121
"stopDebuggerOnAppExit": true,
22-
"enableVariablesPanel": false,
2322
"injectRaleTrackerTask": false,
2423
"rendezvousTracking": true,
2524
"enableDebugProtocol": true

.vscode/tasks.json

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
{
2-
"version": "2.0.0",
3-
"tasks": [
4-
{
5-
"label": "build-tests",
6-
"type": "shell",
7-
"command": "npm run build-tests"
8-
}
9-
]
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "build-tests",
6+
"type": "shell",
7+
"command": "npm run build-tests"
8+
},
9+
{
10+
"label": "build-demo-app",
11+
"type": "shell",
12+
"options": {
13+
"cwd": "${workspaceFolder}/demos/simple-brightscript"
14+
},
15+
"command": "npx bsc",
16+
"problemMatcher": []
17+
}
18+
]
1019
}
Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
{
2-
"files": [
3-
"manifest",
4-
"source/**/*.*",
5-
"components/**/*.*",
6-
"images/**/*.*"
7-
]
8-
}
2+
"stagingDir": "../../dist/demos/simple-brightscript",
3+
"retainStagingDir": true,
4+
"createPackage": false,
5+
"sourceMap": true,
6+
"files": [
7+
"manifest",
8+
"source/**/*.*",
9+
"components/**/*.*",
10+
"images/**/*.*",
11+
{
12+
"src": "../../src/components/Promise.xml",
13+
"dest": "components/Promise.xml"
14+
},
15+
{
16+
"src": "../../src/source/promises.bs",
17+
"dest": "source/promises.bs"
18+
}
19+
]
20+
}

demos/simple-brightscript/components/MainScene.brs renamed to demos/simple-brightscript/components/MainScene.bs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@ sub chainExample()
104104
end sub
105105

106106
sub parallelExample()
107-
promises = promises_all([
107+
promiseArray = promises_all([
108108
getIpApiTimeZoneByDomain("google.com")
109109
getIpApiTimeZoneByDomain("netflix.com")
110110
getIpApiTimeZoneByDomain("chatgpt.com")
111111
])
112-
promises_chain(promises).then(function(timezones)
112+
promises_chain(promiseArray).then(function(timezones)
113113
m.top.parallelResult = {
114114
result: [
115115
"Google.com's timezone is " + timezones[0].timezone,
@@ -207,4 +207,4 @@ end sub
207207

208208
'****************************************************************
209209
'#endregion *** HELPER FUNCTIONS
210-
'****************************************************************
210+
'****************************************************************

demos/simple-brightscript/components/MainScene.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<component name="MainScene" extends="Scene">
3-
<script type="text/brightscript" uri="MainScene.brs"/>
4-
<script type="text/brightscript" uri="pkg:/source/promises.brs"/>
3+
<script type="text/brightscript" uri="MainScene.bs"/>
4+
<script type="text/brightscript" uri="pkg:/source/promises.bs"/>
55
<interface>
66
<field id="simpleResult" type="assocarray"/>
77
<field id="chainResult" type="assocarray"/>
File renamed without changes.

demos/simple-brightscript/components/NetworkTask.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?rokuml version="1.0" encoding="utf-8"?>
22
<component name="NetworkTask" extends="Task">
3-
<script type="text/brightscript" uri="NetworkTask.brs"/>
4-
<script type="text/brightscript" uri="pkg:/source/promises.brs"/>
3+
<script type="text/brightscript" uri="NetworkTask.bs"/>
4+
<script type="text/brightscript" uri="pkg:/source/promises.bs"/>
55
<interface>
66
<field id="url" type="string"/>
77
<field id="method" type="string"/>

demos/simple-brightscript/components/Promise.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)