zalmoxisus / redux-devtools-extension

Redux DevTools extension.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

trace option not working as-intended

kylemh opened this issue · comments

I use Next.js and Redux without next-redux-wrapper (only ever creating and using my store on the client).

I see in other examples that trace is supposed to supply source code and correct line numbers. For me, I see the following, uninteractive text:

Screen Shot 2021-05-25 at 9 16 52 AM

If anybody has any ideas, I'm desperately in need of the ability to trace these actions!

Store Init Code ```tsx import { configureStore } from '@reduxjs/toolkit'; import LogRocket from 'logrocket'; import { Store } from 'redux'; import createSagaMiddleware, { Task } from 'redux-saga'; import { createRouterMiddleware, initialRouterState } from 'connected-next-router'; import { NextRouter } from 'next/router'; import thunk from 'redux-thunk'; import { previousRouteMiddleware } from './previousRouteMiddleware'; import createRootReducer from './rootReducer'; import rootSagas from './sagas';

export interface SagaStore extends Store {
sagaTask?: Task;
}

let globalStore: any = null;

export const makeStore = (router: NextRouter) => {
if (globalStore) {
return globalStore;
}

const sagaMiddleware = createSagaMiddleware();

const store = configureStore({
reducer: createRootReducer(),
middleware: [thunk, createRouterMiddleware(), previousRouteMiddleware, sagaMiddleware, LogRocket.reduxMiddleware()],
preloadedState: {
router: initialRouterState(router.asPath),
},
devTools: {
trace: true,
traceLimit: 10,
},
});

(store as SagaStore).sagaTask = sagaMiddleware.run(rootSagas);

globalStore = { store };
return globalStore;
};


</details>
commented

You might want to try setting webpack config devtool option to 'source-map' as explained in the doc.

@kylemh did you find a solution for it?

No, I'm sorry.

Hi you found any solution after two years ? Now i have same problem. Trace is coming. But source map is not.

Still no, but - most importantly - I'm not looking for one anymore 😂