How to enable trace and traceLimit with ngrx?
Asked Answered
R

2

12

I am trying to enable trace and traceLimit (this feature https://extension.remotedev.io/docs/Features/Trace.html) on ngrx/store-devtools.

I am currently using these packages and version, and running Angular 8.

"@ngrx/store": "^8.0.1"

"@ngrx/store-devtools": "^8.0.1"

@NgModule({
  declarations: [
    AppComponent,
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    StoreModule.forRoot({}, ),
    StoreDevtoolsModule.instrument({
      maxAge: 25,
      logOnly: false,
      trace: true // KINDA EXPECTING AN OPTION LIKE THIS BUT SEEMS TO NOT BE SUPPORTED
    }),
  ],
  providers: [],
  bootstrap: [AppComponent, ],
}, )

I would like to see the stack in the Redux DevTools Chrome extension.

Removable answered 17/6, 2019 at 17:13 Comment(5)
ngrx.io/guide/store-devtools/…Kinlaw
@Kinlaw there is nothing about trace and tracelimit in that linkStablish
seems it's there only it's not in the type def github.com/zalmoxisus/redux-devtools-extension/pull/624Stablish
try like this and see if it works StoreDevtoolsModule.instrument(<any>{ trace: true, })Stablish
btw seems there is no trace in their source github.com/ngrx/platform/blob/master/modules/store-devtools/src/…Stablish
H
5

These features are only enabled in a redux application.

Because of this, the test view is also disabled. See https://github.com/ngrx/platform/issues/1868 for more info.

Holomorphic answered 17/6, 2019 at 19:52 Comment(1)
Thanks Tim for your work on Ngrx. It appears this feature has been implemented since you wrote this answer, so I've added another answer with the updated information.Clio
C
2

It appears that in 2022 the trace features were implemented in ngrx. Git issue: https://github.com/ngrx/platform/pull/3665.

Trace worked for me by configuring the devtool connection appropriately in my Angular module file. Where you would normally set up instrumentation, add the configuration for trace.

    !environment.production ? StoreDevtoolsModule.instrument({ 
      trace: true
    }) : [],
Clio answered 8/8, 2023 at 19:59 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.