Skip to content

Commit 78f676c

Browse files
committed
Added debug.app.folder template variable
1 parent bbb26b3 commit 78f676c

File tree

10 files changed

+15
-7
lines changed

10 files changed

+15
-7
lines changed

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"icon": "assets/fastiot-logo-256.png",
66
"license": "LGPL-3.0-only",
77
"preview": true,
8-
"version": "0.4.0",
8+
"version": "0.4.1",
99
"publisher": "devdotnetorg",
1010
"private": "false",
1111
"identity": {
@@ -104,6 +104,11 @@
104104
"default": 0,
105105
"markdownDescription": "Custom key length in bits. Replaces `#fastiot.device.ssh.keytype#`. For example `256`. See [Extension settings](https://github.com/devdotnetorg/vscode-extension-dotnet-fastiot/blob/master/docs/Extension-settings.md)."
106106
},
107+
"fastiot.device.debug.app.folder": {
108+
"type": "string",
109+
"default": "~/fastiot/debugapps",
110+
"markdownDescription": "Folder to put debug apps on the device. See [Extension settings](https://github.com/devdotnetorg/vscode-extension-dotnet-fastiot/blob/master/docs/Extension-settings.md)."
111+
},
107112
"fastiot.launch.templatetitle": {
108113
"type": "string",
109114
"default": "Launch on %{device.label} (%{project.name}, %{device.board.name}, %{device.user.debug})",

src/Configuration/IotConfiguration.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ export class IotConfiguration {
2626
public get BitsKeySshDevice():number {
2727
const KeySsh = this.InitTypeAndBitsKeySshDevice();
2828
return KeySsh.BitsKey;}
29+
public get DebugAppFolderDevice():string {
30+
return <string>vscode.workspace.getConfiguration().get('fastiot.device.debug.app.folder');}
2931
public get TemplateTitleLaunch():string {
3032
return <string>vscode.workspace.getConfiguration().get('fastiot.launch.templatetitle');}
3133
public Folder: IotConfigurationFolder;

src/Templates/IotTemplate.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,7 @@ export class IotTemplate extends EntityBase<IotTemplateAttribute> {
410410
this._mergeDictionary.set("%{template.storage.path.aswindows}",<string>storagePath);
411411
const userName=os.userInfo().username;
412412
this._mergeDictionary.set("%{os.userinfo.username}",<string>userName);
413+
this._mergeDictionary.set("%{debug.app.folder}",<string>config.DebugAppFolderDevice);
413414
}
414415

415416
private CreateDictionaryStep5DefinePathToProject(dstPath:string) {
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
2 Bytes
Binary file not shown.

templates/system/dotnet-console/template.fastiot.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ id: dotnet-console # unique
44
#isVisible: yes # yes,no. Related to the dependsOn parameter. Coming in one of the next version
55
platform: # win32, linux. Only Windows is currently supported
66
- win32
7-
version: "0.2"
8-
releaseDate: "2023-03-12" # YYYY-MM-DD
9-
forVersionExt: 0.3.2
7+
version: "0.3"
8+
releaseDate: "2023-07-08" # YYYY-MM-DD
9+
forVersionExt: 0.4.1
1010
author: DevDotNet.ORG
1111
emailAuthor: fastiot@devdotnet.org
1212
license: MIT

templates/system/dotnet-console/template/.vscode/insert_launch_key.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"request": "launch",
1111
"program": "dotnet",
1212
"args": ["./%{project.name}.dll"],
13-
"cwd": "~/fastiot/debugapps/%{project.name}",
13+
"cwd": "%{debug.app.folder}/%{project.name}",
1414
"stopAtEntry": false,
1515
"console": "integratedTerminal",
1616
"env": {

templates/system/dotnet-console/template/.vscode/insert_tasks_key.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"-p",
2929
"%{device.ssh.port}",
3030
"%{device.user.debug}@%{device.host}",
31-
"mkdir -p ~/fastiot/debugapps/%{project.name}"
31+
"mkdir -p %{debug.app.folder}/%{project.name}"
3232
],
3333
"problemMatcher": "$msCompile"
3434
},
@@ -43,7 +43,7 @@
4343
"-e",
4444
"%{extension.apps.builtin.aswindows}\\cwrsync\\ssh.exe -i %{device.ssh.key.path.full.aswindows} -o 'StrictHostKeyChecking no' -p %{device.ssh.port}",
4545
"%{project.path.full.ascygdrive}/bin/Debug/%{project.dotnet.targetframework}/%{device.dotnet.rid}/",
46-
"%{device.user.debug}@%{device.host}:~/fastiot/debugapps/%{project.name}"
46+
"%{device.user.debug}@%{device.host}:%{debug.app.folder}/%{project.name}"
4747
],
4848
"problemMatcher": "$msCompile"
4949
}
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)