@@ -40,7 +40,7 @@ export class WebKitDebugAdapter implements DebugProtocol.IDebugAdapter {
40
40
private _webKitConnection : INSDebugConnection ;
41
41
private _eventHandler : ( event : DebugProtocol . Event ) => void ;
42
42
private _lastOutputEvent : OutputEvent ;
43
- private _loggerFrontendHandler : LoggerHandler = args => this . fireEvent ( new OutputEvent ( ` › ${ args . message } \n` , args . type . toString ( ) ) ) ;
43
+ private _loggerFrontendHandler : LoggerHandler = args => this . fireEvent ( new OutputEvent ( `${ args . message } \n` , args . type . toString ( ) ) ) ;
44
44
private _request : DebugRequest ;
45
45
46
46
public constructor ( ) {
@@ -142,6 +142,8 @@ export class WebKitDebugAdapter implements DebugProtocol.IDebugAdapter {
142
142
Services . extensionClient ( ) . analyticsLaunchDebugger ( { request : this . _request . isSync ? "sync" : args . request , platform : args . platform } ) ;
143
143
144
144
// Run CLI Command
145
+ Services . logger ( ) . log ( `[NSDebugAdapter] Using tns CLI on path '${ this . _request . project . cli . path } '` , Tags . FrontendMessage ) ;
146
+ Services . logger ( ) . log ( '[NSDebugAdapter] Running tns command...' , Tags . FrontendMessage ) ;
145
147
let cliCommand : DebugResult ;
146
148
if ( this . _request . isLaunch ) {
147
149
cliCommand = this . _request . project . debug ( { stopOnEntry : this . _request . launchArgs . stopOnEntry } , this . _request . args . tnsArgs ) ;
@@ -161,14 +163,16 @@ export class WebKitDebugAdapter implements DebugProtocol.IDebugAdapter {
161
163
162
164
let promiseResolve = null ;
163
165
let promise : Promise < void > = new Promise < void > ( ( res , rej ) => { promiseResolve = res ; } ) ;
166
+ Services . logger ( ) . log ( '[NSDebugAdapter] Watching the tns CLI output to receive a connection token' , Tags . FrontendMessage ) ;
164
167
// Attach to the running application
165
168
cliCommand . tnsOutputEventEmitter . on ( 'readyForConnection' , ( connectionToken : string | number ) => {
166
169
connectionToken = this . _request . isAndroid ? this . _request . androidProject . getDebugPortSync ( ) : connectionToken ;
167
- Services . logger ( ) . log ( `Attaching to application on ${ connectionToken } ` ) ;
170
+ Services . logger ( ) . log ( `[NSDebugAdapter] Attaching to application on ${ connectionToken } ` , Tags . FrontendMessage ) ;
168
171
let connection : INSDebugConnection = this . _request . isAndroid ? new AndroidConnection ( ) : new IosConnection ( ) ;
169
172
this . setConnection ( connection ) ;
170
173
let attachPromise = this . _request . isAndroid ? ( < AndroidConnection > connection ) . attach ( < number > connectionToken , 'localhost' ) : ( < IosConnection > connection ) . attach ( < string > connectionToken ) ;
171
174
attachPromise . then ( ( ) => {
175
+ Services . logger ( ) . log ( `[NSDebugAdapter] Successfully attached to the target application'` , Tags . FrontendMessage ) ;
172
176
// Send InitializedEvent
173
177
this . fireEvent ( new InitializedEvent ( ) ) ;
174
178
promiseResolve ( ) ;
0 commit comments