@@ -43,6 +43,7 @@ export class WebKitDebugAdapter implements IDebugAdapter {
43
43
private appRoot : string ;
44
44
private platform : string ;
45
45
private isAttached : boolean ;
46
+ private _lastOutputEvent : OutputEvent ;
46
47
47
48
public constructor ( ) {
48
49
this . _variableHandles = new Handles < IScopeVarHandle > ( ) ;
@@ -161,6 +162,7 @@ export class WebKitDebugAdapter implements IDebugAdapter {
161
162
connection . on ( 'Debugger.globalObjectCleared' , ( ) => this . onGlobalObjectCleared ( ) ) ;
162
163
connection . on ( 'Debugger.breakpointResolved' , params => this . onBreakpointResolved ( params ) ) ;
163
164
connection . on ( 'Console.messageAdded' , params => this . onConsoleMessage ( params ) ) ;
165
+ connection . on ( 'Console.messageRepeatCountUpdated' , params => this . onMessageRepeatCountUpdated ( params ) ) ;
164
166
connection . on ( 'Inspector.detached' , ( ) => this . terminateSession ( ) ) ;
165
167
connection . on ( 'close' , ( ) => this . terminateSession ( ) ) ;
166
168
connection . on ( 'error' , ( ) => this . terminateSession ( ) ) ;
@@ -312,9 +314,15 @@ export class WebKitDebugAdapter implements IDebugAdapter {
312
314
313
315
const formattedMessage = formatConsoleMessage ( localMessage , isClientPath ) ;
314
316
if ( formattedMessage ) {
315
- this . fireEvent ( new OutputEvent (
316
- formattedMessage . text + '\n' ,
317
- formattedMessage . isError ? 'stderr' : 'stdout' ) ) ;
317
+ let outputEvent : OutputEvent = new OutputEvent ( formattedMessage . text + '\n' , formattedMessage . isError ? 'stderr' : 'stdout' ) ;
318
+ this . _lastOutputEvent = outputEvent ;
319
+ this . fireEvent ( outputEvent ) ;
320
+ }
321
+ }
322
+
323
+ public onMessageRepeatCountUpdated ( params : WebKitProtocol . Console . MessageRepeatCountUpdatedEventArgs ) {
324
+ if ( this . _lastOutputEvent ) {
325
+ this . fireEvent ( this . _lastOutputEvent ) ;
318
326
}
319
327
}
320
328
0 commit comments