File tree 3 files changed +9
-21
lines changed
3 files changed +9
-21
lines changed Original file line number Diff line number Diff line change 87
87
"type" : " nativescript" ,
88
88
"platform" : " ios" ,
89
89
"request" : " launch" ,
90
- "appRoot" : " . " ,
90
+ "appRoot" : " ${workspaceRoot} " ,
91
91
"sourceMaps" : true ,
92
92
"diagnosticLogging" : false ,
93
93
"emulator" : false
97
97
"type" : " nativescript" ,
98
98
"platform" : " ios" ,
99
99
"request" : " attach" ,
100
- "appRoot" : " . " ,
100
+ "appRoot" : " ${workspaceRoot} " ,
101
101
"sourceMaps" : true ,
102
102
"diagnosticLogging" : false ,
103
103
"emulator" : false
107
107
"type" : " nativescript" ,
108
108
"platform" : " ios" ,
109
109
"request" : " launch" ,
110
- "appRoot" : " . " ,
110
+ "appRoot" : " ${workspaceRoot} " ,
111
111
"sourceMaps" : true ,
112
112
"diagnosticLogging" : false ,
113
113
"emulator" : true
117
117
"type" : " nativescript" ,
118
118
"platform" : " ios" ,
119
119
"request" : " attach" ,
120
- "appRoot" : " . " ,
120
+ "appRoot" : " ${workspaceRoot} " ,
121
121
"sourceMaps" : true ,
122
122
"diagnosticLogging" : false ,
123
123
"emulator" : true
127
127
"type" : " nativescript" ,
128
128
"platform" : " android" ,
129
129
"request" : " launch" ,
130
- "appRoot" : " . " ,
130
+ "appRoot" : " ${workspaceRoot} " ,
131
131
"sourceMaps" : true ,
132
132
"diagnosticLogging" : false ,
133
133
"emulator" : false
137
137
"type" : " nativescript" ,
138
138
"platform" : " android" ,
139
139
"request" : " launch" ,
140
- "appRoot" : " . " ,
140
+ "appRoot" : " ${workspaceRoot} " ,
141
141
"sourceMaps" : true ,
142
142
"diagnosticLogging" : false ,
143
143
"emulator" : true
147
147
"type" : " nativescript" ,
148
148
"platform" : " android" ,
149
149
"request" : " attach" ,
150
- "appRoot" : " . " ,
150
+ "appRoot" : " ${workspaceRoot} " ,
151
151
"sourceMaps" : false ,
152
152
"diagnosticLogging" : false ,
153
153
"emulator" : false
157
157
"type" : " nativescript" ,
158
158
"platform" : " android" ,
159
159
"request" : " attach" ,
160
- "appRoot" : " . " ,
160
+ "appRoot" : " ${workspaceRoot} " ,
161
161
"sourceMaps" : false ,
162
162
"diagnosticLogging" : false ,
163
163
"emulator" : true
Original file line number Diff line number Diff line change @@ -399,17 +399,7 @@ export function errP(msg: any): Promise<any> {
399
399
* Calculates the appRoot from a launch/attach request. The appRoot is the root directory of the NativeScript app.
400
400
*/
401
401
export function getAppRoot ( args : ILaunchRequestArgs | IAttachRequestArgs ) : string {
402
- let appRoot : string ;
403
- if ( args . appRoot ) {
404
- appRoot = args . appRoot ;
405
- if ( ! path . isAbsolute ( appRoot ) ) {
406
- appRoot = path . resolve ( args . cwd , appRoot ) ;
407
- }
408
- } else {
409
- appRoot = args . cwd ;
410
- }
411
-
412
- return appRoot ;
402
+ return ( args . appRoot && path . isAbsolute ( args . appRoot ) ) ? args . appRoot : '' ;
413
403
}
414
404
415
405
/**
Original file line number Diff line number Diff line change 1
1
import { DebugProtocol } from 'vscode-debugprotocol' ;
2
2
3
3
export interface ILaunchRequestArgs extends DebugProtocol . LaunchRequestArguments {
4
- cwd : string ; /* Automatically set by VS Code to the currently opened folder */
5
4
platform : string ;
6
5
appRoot ?: string ;
7
6
runtimeArgs ?: string [ ] ;
@@ -15,7 +14,6 @@ export interface ILaunchRequestArgs extends DebugProtocol.LaunchRequestArguments
15
14
}
16
15
17
16
export interface IAttachRequestArgs extends DebugProtocol . AttachRequestArguments {
18
- cwd : string ; /* Automatically set by VS Code to the currently opened folder */
19
17
platform : string ;
20
18
appRoot ?: string ;
21
19
sourceMaps ?: boolean ;
You can’t perform that action at this time.
0 commit comments