Debug actions
See original GitHub issueI cannot debugger
or console.log
inside an action. It does nothing and also swallows all errors.
How can I see what is going on inside an action?
export const {
reducer: platformReducer,
actions: platformActions
} = autodux({
slice: 'platforms',
initial: {},
actions: {
setPlatforms: (_, payload) => {
const newPlatform = {};
console.log(payload);
debugger;
payload.forEach(g => newPlatforms[g.id] = g);
return newPlatforms;
}
}
});
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Enabling debug logging - GitHub Docs
To enable step debug logging, you must set the following secret in the repository that contains the workflow: ACTIONS_STEP_DEBUG to true . ·...
Read more >GitHub Actions: Re-run jobs with debug logging
You can now enable debug logging when you re-run jobs in a GitHub Actions workflow run. This gives you additional information about the ......
Read more >Debugging Actions - UiPath Documentation Portal
Debugging of a single file or the whole project can be performed both from the Design or Debug ribbon tabs. However, the debugging...
Read more >Debugging in Visual Studio Code
One of the great things in Visual Studio Code is debugging support. Set breakpoints, step-in, inspect variables and more.
Read more >debug-action - IBM
Use the debug-action command to begin a debug session of a GatewayScript action in a processing policy. Use the no debug-action command to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I did notice that you’re mutating an object that does not exist in your reducer.
At the top of the reducer, you have:
Then, when you try to use it, you use
newPlatforms
instead ofnewPlatform
.Any good lint tool should point out this kind of mistake for you. I wrote an article on setting up lint tools.
Another thing to try: Can you reproduce it when you try to reduce over an array of actions with
Array.prototype.reduce
?