title: How to debug blocks in Gutenberg wordpress?
body: <p>I am building a new block for Gutenberg wordpress and when I get errors is it impossible for me to know what is wrong. Are there any steps for debugging blocks? How to get more specific information on the error?</p>
  
  <p>I have react dev tools on chrome. I did a search and no information on debugging blocks for Gutenberg wordpress.</p>
  
  <p>Here are the errors I get and dont know what to do with it:</p>
  
  <pre><code>react.js?ver=16.9.0:1233 Uncaught Invariant Violation: Objects are not valid as a React child (found: object with keys {icon, upload, swap, remove}). If you meant to render a collection of children, use an array instead.
      in Tooltip (created by edit)
      in div (created by ToolbarGroupContainer)
      in ToolbarGroupContainer (created by ToolbarGroup)
      in ToolbarGroup (created by toolbar_Toolbar)
      in toolbar_Toolbar (created by edit)
      in bubbles_virtually_fill_Fill (created by slot_fill_Fill)
      in slot_fill_Fill (created by BlockControlsFill)
      in BlockControlsFill (created by BlockControlsFill)
      in BlockControlsFill (created by Context.Consumer)
      in IfBlockEditSelected(BlockControlsFill) (created by ForwardRef)
      in ForwardRef (created by edit)
      in div (created by edit)
      in div (created by edit)
      in div (created by edit)
      in section (created by edit)
      in div (created by edit)
      in edit (created by Edit)
      in Edit (created by WithToolbarControls(Edit))
      in WithToolbarControls(Edit) (created by WithInspectorControl(WithToolbarControls(Edit)))
      in WithInspectorControl(WithToolbarControls(Edit)) (created by WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))
      in WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))
      in Unknown (created by WithDispatch(Component))
      in WithDispatch(Component)
      in Unknown (created by WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))
      in WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))) (created by WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))))
      in WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))) (created by WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))))
      in WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))) (created by WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))))))
      in WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))))) (created by WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))))))
      in WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))))) (created by WithAdvancedControls(WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))))))))
      in WithAdvancedControls(WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))))))) (created by WithReplaceImage(WithAdvancedControls(WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))))))))
      in WithReplaceImage(WithAdvancedControls(WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))))))) (created by PositioningControl(WithReplaceImage(WithAdvancedControls(WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))))))))))
      in PositioningControl(WithReplaceImage(WithAdvancedControls(WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))))))))) (created by WithFilters(Edit))
      in WithFilters(Edit) (created by BlockEdit)
      in BlockEdit (created by block_BlockListBlock)
      in BlockCrashBoundary (created by block_BlockListBlock)
      in div (created by ForwardRef)
      in ForwardRef (created by block_BlockListBlock)
      in block_BlockListBlock (created by (block_BlockListBlock))
      in (block_BlockListBlock)
      in Unknown
      in Unknown (created by WithFontSettings((block_BlockListBlock)))
      in WithFontSettings((block_BlockListBlock))
      in Unknown
      in Unknown (created by AddEditorBlockAttributes(WithFontSettings((block_BlockListBlock))))
      in AddEditorBlockAttributes(WithFontSettings((block_BlockListBlock)))
      in Unknown
      in Unknown (created by AddEditorBlockAttributes(AddEditorBlockAttributes(WithFontSettings((block_BlockListBlock)))))
      in AddEditorBlockAttributes(AddEditorBlockAttributes(WithFontSettings((block_BlockListBlock)))) (created by WithFilters(block_BlockListBlock))
      in WithFilters(block_BlockListBlock) (created by IfCondition(WithFilters(block_BlockListBlock)))
      in IfCondition(WithFilters(block_BlockListBlock)) (created by WithDispatch(IfCondition(WithFilters(block_BlockListBlock))))
      in WithDispatch(IfCondition(WithFilters(block_BlockListBlock)))
      in Unknown (created by WithSelect(WithDispatch(IfCondition(WithFilters(block_BlockListBlock)))))
      in WithSelect(WithDispatch(IfCondition(WithFilters(block_BlockListBlock))))
      in Unknown (created by Pure(WithViewportMatch(WithSelect(WithDispatch(IfCondition(WithFilters(block_BlockListBlock)))))))
      in Pure(WithViewportMatch(WithSelect(WithDispatch(IfCondition(WithFilters(block_BlockListBlock)))))) (created by BlockList)
      in div (created by ForwardRef(RootContainer))
      in div (created by InsertionPoint)
      in InsertionPoint (created by ForwardRef(RootContainer))
      in ForwardRef(RootContainer) (created by BlockList)
      in BlockList
      in Unknown (created by VisualEditor)
      in div (created by CopyHandler)
      in CopyHandler (created by WithDispatch(CopyHandler))
      in WithDispatch(CopyHandler) (created by VisualEditor)
      in div (created by ObserveTyping)
      in ObserveTyping (created by WithSafeTimeout(ObserveTyping))
      in WithSafeTimeout(ObserveTyping) (created by VisualEditor)
      in div (created by WritingFlow)
      in div (created by WritingFlow)
      in WritingFlow (created by VisualEditor)
      in div (created by CopyHandler)
      in CopyHandler (created by WithDispatch(CopyHandler))
      in WithDispatch(CopyHandler) (created by VisualEditor)
      in div (created by Typewriter)
      in Typewriter
      in Unknown (created by WithSelect(Typewriter))
      in WithSelect(Typewriter) (created by VisualEditor)
      in div (created by BlockSelectionClearer)
      in BlockSelectionClearer (created by WithDispatch(BlockSelectionClearer))
      in WithDispatch(BlockSelectionClearer)
      in Unknown (created by WithSelect(WithDispatch(BlockSelectionClearer)))
      in WithSelect(WithDispatch(BlockSelectionClearer)) (created by VisualEditor)
      in VisualEditor (created by Layout)
      in div (created by EditorSkeleton)
      in div (created by EditorSkeleton)
      in div (created by EditorSkeleton)
      in EditorSkeleton (created by NavigateRegions(EditorSkeleton))
      in div (created by NavigateRegions(EditorSkeleton))
      in NavigateRegions(EditorSkeleton) (created by Layout)
      in div (created by FocusReturnProvider)
      in FocusReturnProvider (created by Layout)
      in Layout (created by Editor)
      in ErrorBoundary (created by Editor)
      in BlockEditorProvider (created by WithDispatch(BlockEditorProvider))
      in WithDispatch(BlockEditorProvider)
      in Unknown (created by Context.Consumer)
      in WithRegistryProvider(WithDispatch(BlockEditorProvider)) (created by EditorProvider)
      in EntityProvider (created by EditorProvider)
      in EntityProvider (created by EditorProvider)
      in EditorProvider (created by WithDispatch(EditorProvider))
      in WithDispatch(EditorProvider)
      in Unknown (created by WithSelect(WithDispatch(EditorProvider)))
      in WithSelect(WithDispatch(EditorProvider))
      in Unknown (created by Context.Consumer)
      in WithRegistryProvider(WithSelect(WithDispatch(EditorProvider))) (created by Editor)
      in div (created by DropZoneProvider)
      in DropZoneProvider (created by Editor)
      in slot_fill_provider_SlotFillProvider (created by SlotFillProvider)
      in SlotFillProvider (created by Editor)
      in StrictMode (created by Editor)
      in Editor (created by WithDispatch(Editor))
      in WithDispatch(Editor)
      in Unknown (created by WithSelect(WithDispatch(Editor)))
      in WithSelect(WithDispatch(Editor))
      at https://tatifrank.com/wp-includes/js/dist/vendor/react.js?ver=16.9.0:1233:30
      at traverseAllChildrenImpl (https://tatifrank.com/wp-includes/js/dist/vendor/react.js?ver=16.9.0:1236:9)
      at traverseAllChildren (https://tatifrank.com/wp-includes/js/dist/vendor/react.js?ver=16.9.0:1264:10)
      at Object.forEachChildren [as forEach] (https://tatifrank.com/wp-includes/js/dist/vendor/react.js?ver=16.9.0:1309:3)
      at https://tatifrank.com/wp-includes/js/dist/element.js?ver=a7bf20c…:884:38
      at Array.reduce (&lt;anonymous&gt;)
      at concatChildren (https://tatifrank.com/wp-includes/js/dist/element.js?ver=a7bf20c…:883:28)
      at Tooltip.render (https://tatifrank.com/wp-includes/js/dist/components.js?ver=90861a4…:10616:92)
      at finishClassComponent (https://tatifrank.com/wp-includes/js/dist/vendor/react-dom.js?ver=16.9.0:17177:31)
      at updateClassComponent (https://tatifrank.com/wp-includes/js/dist/vendor/react-dom.js?ver=16.9.0:17132:24)
  (anonymous) @   react.js?ver=16.9.0:1233
  traverseAllChildrenImpl @   react.js?ver=16.9.0:1236
  traverseAllChildren @   react.js?ver=16.9.0:1264
  forEachChildren @   react.js?ver=16.9.0:1309
  (anonymous) @   element.js?ver=a7bf2…c65111e966d5592:884
  concatChildren  @   element.js?ver=a7bf2…c65111e966d5592:883
  render  @   components.js?ver=90…d6750cb7ae6f4:10616
  finishClassComponent    @   react-dom.js?ver=16.9.0:17177
  updateClassComponent    @   react-dom.js?ver=16.9.0:17132
  beginWork$1 @   react-dom.js?ver=16.9.0:18643
  callCallback    @   react-dom.js?ver=16.9.0:341
  invokeGuardedCallbackDev    @   react-dom.js?ver=16.9.0:391
  invokeGuardedCallback   @   react-dom.js?ver=16.9.0:448
  beginWork$$1    @   react-dom.js?ver=16.9.0:23355
  performUnitOfWork   @   react-dom.js?ver=16.9.0:22346
  workLoopSync    @   react-dom.js?ver=16.9.0:22323
  renderRoot  @   react-dom.js?ver=16.9.0:22016
  runRootCallback @   react-dom.js?ver=16.9.0:21692
  (anonymous) @   react-dom.js?ver=16.9.0:11491
  unstable_runWithPriority    @   react.js?ver=16.9.0:2820
  runWithPriority$2   @   react-dom.js?ver=16.9.0:11443
  flushSyncCallbackQueueImpl  @   react-dom.js?ver=16.9.0:11487
  flushSyncCallbackQueue  @   react-dom.js?ver=16.9.0:11476
  discreteUpdates$1   @   react-dom.js?ver=16.9.0:21815
  discreteUpdates @   react-dom.js?ver=16.9.0:2357
  dispatchDiscreteEvent   @   react-dom.js?ver=16.9.0:6104
  </code></pre>
  
  <pre><code>react_devtools_backend.js:6 The above error occurred in the &lt;Tooltip&gt; component:
      in Tooltip (created by edit)
      in div (created by ToolbarGroupContainer)
      in ToolbarGroupContainer (created by ToolbarGroup)
      in ToolbarGroup (created by toolbar_Toolbar)
      in toolbar_Toolbar (created by edit)
      in bubbles_virtually_fill_Fill (created by slot_fill_Fill)
      in slot_fill_Fill (created by BlockControlsFill)
      in BlockControlsFill (created by BlockControlsFill)
      in BlockControlsFill (created by Context.Consumer)
      in IfBlockEditSelected(BlockControlsFill) (created by ForwardRef)
      in ForwardRef (created by edit)
      in div (created by edit)
      in div (created by edit)
      in div (created by edit)
      in section (created by edit)
      in div (created by edit)
      in edit (created by Edit)
      in Edit (created by WithToolbarControls(Edit))
      in WithToolbarControls(Edit) (created by WithInspectorControl(WithToolbarControls(Edit)))
      in WithInspectorControl(WithToolbarControls(Edit)) (created by WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))
      in WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))
      in Unknown (created by WithDispatch(Component))
      in WithDispatch(Component)
      in Unknown (created by WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))
      in WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))) (created by WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))))
      in WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))) (created by WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))))
      in WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))) (created by WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))))))
      in WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))))) (created by WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))))))
      in WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))))) (created by WithAdvancedControls(WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))))))))
      in WithAdvancedControls(WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))))))) (created by WithReplaceImage(WithAdvancedControls(WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))))))))
      in WithReplaceImage(WithAdvancedControls(WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))))))) (created by PositioningControl(WithReplaceImage(WithAdvancedControls(WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))))))))))
      in PositioningControl(WithReplaceImage(WithAdvancedControls(WithAdvancedControls(WithAttributes(WithControls(WithInspectorControl(WithMultipleValidation(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))))))))) (created by WithFilters(Edit))
      in WithFilters(Edit) (created by BlockEdit)
      in BlockEdit (created by block_BlockListBlock)
      in BlockCrashBoundary (created by block_BlockListBlock)
      in div (created by ForwardRef)
      in ForwardRef (created by block_BlockListBlock)
      in block_BlockListBlock (created by (block_BlockListBlock))
      in (block_BlockListBlock)
      in Unknown
      in Unknown (created by WithFontSettings((block_BlockListBlock)))
      in WithFontSettings((block_BlockListBlock))
      in Unknown
      in Unknown (created by AddEditorBlockAttributes(WithFontSettings((block_BlockListBlock))))
      in AddEditorBlockAttributes(WithFontSettings((block_BlockListBlock)))
      in Unknown
      in Unknown (created by AddEditorBlockAttributes(AddEditorBlockAttributes(WithFontSettings((block_BlockListBlock)))))
      in AddEditorBlockAttributes(AddEditorBlockAttributes(WithFontSettings((block_BlockListBlock)))) (created by WithFilters(block_BlockListBlock))
      in WithFilters(block_BlockListBlock) (created by IfCondition(WithFilters(block_BlockListBlock)))
      in IfCondition(WithFilters(block_BlockListBlock)) (created by WithDispatch(IfCondition(WithFilters(block_BlockListBlock))))
      in WithDispatch(IfCondition(WithFilters(block_BlockListBlock)))
      in Unknown (created by WithSelect(WithDispatch(IfCondition(WithFilters(block_BlockListBlock)))))
      in WithSelect(WithDispatch(IfCondition(WithFilters(block_BlockListBlock))))
      in Unknown (created by Pure(WithViewportMatch(WithSelect(WithDispatch(IfCondition(WithFilters(block_BlockListBlock)))))))
      in Pure(WithViewportMatch(WithSelect(WithDispatch(IfCondition(WithFilters(block_BlockListBlock)))))) (created by BlockList)
      in div (created by ForwardRef(RootContainer))
      in div (created by InsertionPoint)
      in InsertionPoint (created by ForwardRef(RootContainer))
      in ForwardRef(RootContainer) (created by BlockList)
      in BlockList
      in Unknown (created by VisualEditor)
      in div (created by CopyHandler)
      in CopyHandler (created by WithDispatch(CopyHandler))
      in WithDispatch(CopyHandler) (created by VisualEditor)
      in div (created by ObserveTyping)
      in ObserveTyping (created by WithSafeTimeout(ObserveTyping))
      in WithSafeTimeout(ObserveTyping) (created by VisualEditor)
      in div (created by WritingFlow)
      in div (created by WritingFlow)
      in WritingFlow (created by VisualEditor)
      in div (created by CopyHandler)
      in CopyHandler (created by WithDispatch(CopyHandler))
      in WithDispatch(CopyHandler) (created by VisualEditor)
      in div (created by Typewriter)
      in Typewriter
      in Unknown (created by WithSelect(Typewriter))
      in WithSelect(Typewriter) (created by VisualEditor)
      in div (created by BlockSelectionClearer)
      in BlockSelectionClearer (created by WithDispatch(BlockSelectionClearer))
      in WithDispatch(BlockSelectionClearer)
      in Unknown (created by WithSelect(WithDispatch(BlockSelectionClearer)))
      in WithSelect(WithDispatch(BlockSelectionClearer)) (created by VisualEditor)
      in VisualEditor (created by Layout)
      in div (created by EditorSkeleton)
      in div (created by EditorSkeleton)
      in div (created by EditorSkeleton)
      in EditorSkeleton (created by NavigateRegions(EditorSkeleton))
      in div (created by NavigateRegions(EditorSkeleton))
      in NavigateRegions(EditorSkeleton) (created by Layout)
      in div (created by FocusReturnProvider)
      in FocusReturnProvider (created by Layout)
      in Layout (created by Editor)
      in ErrorBoundary (created by Editor)
      in BlockEditorProvider (created by WithDispatch(BlockEditorProvider))
      in WithDispatch(BlockEditorProvider)
      in Unknown (created by Context.Consumer)
      in WithRegistryProvider(WithDispatch(BlockEditorProvider)) (created by EditorProvider)
      in EntityProvider (created by EditorProvider)
      in EntityProvider (created by EditorProvider)
      in EditorProvider (created by WithDispatch(EditorProvider))
      in WithDispatch(EditorProvider)
      in Unknown (created by WithSelect(WithDispatch(EditorProvider)))
      in WithSelect(WithDispatch(EditorProvider))
      in Unknown (created by Context.Consumer)
      in WithRegistryProvider(WithSelect(WithDispatch(EditorProvider))) (created by Editor)
      in div (created by DropZoneProvider)
      in DropZoneProvider (created by Editor)
      in slot_fill_provider_SlotFillProvider (created by SlotFillProvider)
      in SlotFillProvider (created by Editor)
      in StrictMode (created by Editor)
      in Editor (created by WithDispatch(Editor))
      in WithDispatch(Editor)
      in Unknown (created by WithSelect(WithDispatch(Editor)))
      in WithSelect(WithDispatch(Editor))
  
  React will try to recreate this component tree from scratch using the error boundary you provided, BlockCrashBoundary.
  r @ react_devtools_backend.js:6
  logCapturedError @ react-dom.js?ver=16.9.0:19952
  logError @ react-dom.js?ver=16.9.0:19988
  callback @ react-dom.js?ver=16.9.0:21099
  callCallback @ react-dom.js?ver=16.9.0:13067
  commitUpdateEffects @ react-dom.js?ver=16.9.0:13106
  commitUpdateQueue @ react-dom.js?ver=16.9.0:13097
  commitLifeCycles @ react-dom.js?ver=16.9.0:20217
  commitLayoutEffects @ react-dom.js?ver=16.9.0:22951
  callCallback @ react-dom.js?ver=16.9.0:341
  invokeGuardedCallbackDev @ react-dom.js?ver=16.9.0:391
  invokeGuardedCallback @ react-dom.js?ver=16.9.0:448
  commitRootImpl @ react-dom.js?ver=16.9.0:22723
  unstable_runWithPriority @ react.js?ver=16.9.0:2820
  runWithPriority$2 @ react-dom.js?ver=16.9.0:11443
  commitRoot @ react-dom.js?ver=16.9.0:22552
  runRootCallback @ react-dom.js?ver=16.9.0:21692
  (anonymous) @ react-dom.js?ver=16.9.0:11491
  unstable_runWithPriority @ react.js?ver=16.9.0:2820
  runWithPriority$2 @ react-dom.js?ver=16.9.0:11443
  flushSyncCallbackQueueImpl @ react-dom.js?ver=16.9.0:11487
  flushSyncCallbackQueue @ react-dom.js?ver=16.9.0:11476
  discreteUpdates$1 @ react-dom.js?ver=16.9.0:21815
  discreteUpdates @ react-dom.js?ver=16.9.0:2357
  dispatchDiscreteEvent @ react-dom.js?ver=16.9.0:6104
  </code></pre>