10

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.

user2897738
  • 303
  • 1
  • 3
  • 11
  • https://ngrx.io/guide/store-devtools/config#configuration-object-properties – Jota.Toledo Jun 17 '19 at 17:19
  • @Jota.Toledo there is nothing about trace and tracelimit in that link – Reza Jun 17 '19 at 18:22
  • seems it's there only it's not in the type def https://github.com/zalmoxisus/redux-devtools-extension/pull/624 – Reza Jun 17 '19 at 18:30
  • try like this and see if it works `StoreDevtoolsModule.instrument({ trace: true, })` – Reza Jun 17 '19 at 18:32
  • btw seems there is no trace in their source https://github.com/ngrx/platform/blob/master/modules/store-devtools/src/config.ts – Reza Jun 17 '19 at 18:36

2 Answers2

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.

timdeschryver
  • 14,415
  • 1
  • 19
  • 32
  • 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. – speckledcarp Aug 08 '23 at 20:02
0

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
    }) : [],
speckledcarp
  • 6,196
  • 4
  • 22
  • 22