Why are my classes and functions not working in Blender 2.8?
Look in system console for errors

Start blender from a system console and note any error or warning messages that pop up during registration.

Where does console output go

How to view python error messages?

Blender 2.8 has a far stricter naming convention for operators and panels.  The operator with bl_idname = foo.bar should be given the class name FOO_OT_bar  (_OT_ indicates "Operator Type")

Here is an adjustment to the code, I have prepended the button to the 3DView header to test.



import bpy

class OBJECT_OT_all_select_delete(bpy.types.Operator):
    """All select and delete"""
    bl_label = "Delete all"
    bl_idname = "object.all_select_delete"
    bl_description = "All select and delete"

    def execute(self, context):

        bpy.ops.object.mode_set(mode='OBJECT')
        bpy.ops.object.select_all(action='SELECT')
        bpy.ops.object.delete(use_global=False)
        bpy.ops.view3d.snap_cursor_to_center()

def draw_button(self, context):
    self.layout.operator("object.all_select_delete")

def register():
    bpy.utils.register_class(OBJECT_OT_all_select_delete)
    bpy.types.VIEW3D_HT_header.prepend(draw_button)

if __name__ == "__main__":
    register()