@@ -50,21 +50,8 @@ export class IOSDebugService extends DebugServiceBase implements IPlatformDebugS
50
50
debugOptions . emulator = true ;
51
51
}
52
52
53
- if ( ! debugOptions . justlaunch ) {
54
- let projectName = debugData . projectName ;
55
- if ( ! projectName && debugData . projectDir ) {
56
- const projectData = this . $projectDataService . getProjectData ( debugData . projectDir ) ;
57
- projectName = projectData . projectName ;
58
- }
59
-
60
- if ( projectName ) {
61
- this . $deviceLogProvider . setProjectNameForDevice ( debugData . deviceIdentifier , projectName ) ;
62
- }
63
-
64
- await this . device . openDeviceLogStream ( { predicate : IOS_LOG_PREDICATE } ) ;
65
- }
66
-
67
53
await this . $iOSDebuggerPortService . attachToDebuggerPortFoundEvent ( this . device , debugData , debugOptions ) ;
54
+ await this . startDeviceLogProcess ( debugData , debugOptions ) ;
68
55
69
56
if ( debugOptions . emulator ) {
70
57
if ( debugOptions . start ) {
@@ -113,6 +100,26 @@ export class IOSDebugService extends DebugServiceBase implements IPlatformDebugS
113
100
return chromeDebugUrl ;
114
101
}
115
102
103
+ private async startDeviceLogProcess ( debugData : IDebugData , debugOptions : IDebugOptions ) : Promise < void > {
104
+ if ( debugOptions . justlaunch ) {
105
+ // No logs should be printed on console when `--justlaunch` option is passed.
106
+ // On the other side we need to start log process in order to get debugger port from logs.
107
+ this . $deviceLogProvider . muteLogsForDevice ( debugData . deviceIdentifier ) ;
108
+ }
109
+
110
+ let projectName = debugData . projectName ;
111
+ if ( ! projectName && debugData . projectDir ) {
112
+ const projectData = this . $projectDataService . getProjectData ( debugData . projectDir ) ;
113
+ projectName = projectData . projectName ;
114
+ }
115
+
116
+ if ( projectName ) {
117
+ this . $deviceLogProvider . setProjectNameForDevice ( debugData . deviceIdentifier , projectName ) ;
118
+ }
119
+
120
+ await this . device . openDeviceLogStream ( { predicate : IOS_LOG_PREDICATE } ) ;
121
+ }
122
+
116
123
private async killProcess ( childProcess : ChildProcess ) : Promise < void > {
117
124
if ( childProcess ) {
118
125
return new Promise < void > ( ( resolve , reject ) => {
0 commit comments