-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
See callstack for events. #429
Comments
It would be really useful, especially since debugging in redux sometimes becomes unfairly tricky. |
This is a great idea! Don't have time to try adding this myself, but it'd be a fantastic addition. |
Came here to create the same issue. @markerikson proposed a middleware for doing this, but I think it would be incredibly useful as part of the dev tools extension. |
The DevTools implementation would need to capture the stack trace for later use, not just log it to the console, but yes - this would be a HUGE benefit. |
I believe something like
|
Generating stack traces is a pain. Thank's god we have got stacktrace.js! |
Hiya, folks. I got it in my head this evening to see if I could make this happen... and I did! It took a small addition to the The frames are being displayed completely unformatted right now, but once the basic display is added, we can do a lot more work to format them better, such as clickable frame entries that jump straight to the right source in the debugger. That part I have no experience with, so hopefully someone else who has done extension development can figure that part out. Also, at the moment I'm only doing Perhaps we might also want to add an option to not capture the stack traces, just in case someone is worried about performance or something. I would think that once both these pull requests have been merged to those packages, it should just be a matter of rebuilding and republishing the DevTools Extension package to get the results. Here's an example of what it looks like in action: |
A couple quick thoughts on filtering stack traces. I'm currently using There's also the code in the It'd be cool if we used that approach to highlight where the action was dispatched. I imagine it would take some heuristics, though, because otherwise a lot of it might be just the internals of |
Is it possible to trace "async" events, like button->click->event->saga->event->saga->event....? Like how one event could create another, to find the roots |
@theKashey : that one I'm not sure about. I know that the actual browser debuggers can link together things like that, but I have no idea how that's implemented. |
Today I was able to use the stack trace parsing logic and display UI from A click handler from my "Project Mini-Mek" sample app: An action from the new Reddit UI: I've pushed the changes to the At this point, there's a couple major issues:
So, I'm not sure when we might actually manage to get this merged in and an updated version of the DevTools released. |
If you want to make a PR, I'm happy to help with code review to help get the code cleaned up. Can't help with maintainer activity. |
PRs are already open and linked above, but I'll re-link them here: zalmoxisus/redux-devtools-instrument#21 The |
Since I'm not sure when this will be merged in, I'm going to attach unofficial builds of the extension for Chrome and Firefox. Chrome
Firefox
It definitely looks like clicking on a stack trace entry will not open the debugger in Firefox, because the |
Filed as bug 1503475. |
@markerikson did a great job working on this, but, as mentioned, it's still first step and there're some parts to finalize before moving to production, as discussed in zalmoxisus/remotedev-app#43. Also it was implemented against master branch which is old and everything is rewritten in another branch, so I'll have to reimplement it there. I'll finish with critical issues and come back to this one, if someone wants to help, I can assist with more details on what should be done. Meanwhile can install the package kindly provided by Mark in #429 (comment). Or for only seeing callstack (without As discussed in zalmoxisus/redux-devtools-instrument#21, for this feature we'll add |
I did some tweaks in reduxjs/redux-devtools#418 and it's almost ready. Have to finish some other work, and should have Apart from opening resource, as seen in the demo, it can open the file (and jump to the line-column) right in your editor. Pretty useful for debugging, and also as an alternative when there's not possible to use openResource (for Firefox or when using the extension from window or for remote debugging). When there's no openResource support, It'll suggest to specify your editor on Options Page, but you can click Settings button and enable that, also adding the path to your project root directory to append the paths to it. It works out of the box for VSCode, Atom, Webstorm/Phpstorm/IntelliJ, Sublime, Emacs, MacVim, Textmate on Mac and Windows. For Linux you can use By default the extension won't get stack traces, to not affect the performance, have to set For some edge cases where stack trace cannot be gotten with just There's also an optional |
It's now available in |
Closing this. Refer to |
A problem is finding the source of events in the event list. It'd be nice to have an option to click an event and view the callstack that triggered the event.
The text was updated successfully, but these errors were encountered: