appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
34.1k stars 3.69k forks source link

[Product Note] Debugging Experience #1236

Closed Nikhil-Nandagopal closed 3 years ago

Nikhil-Nandagopal commented 3 years ago

Problem statement

Developers on appsmith encounter syntactical and logic errors and thus need a way to debug the errors that are created

Success criteria

Developers who see any error on appsmith should be able to understand why the error occurred and what they should do to fix the error. Core areas:

User story

The user while performing various actions on appsmith enters into an error state. His attention is drawn to the error and is given sufficient information on how to solve the error. He then takes the relevant action and the error disappears

Details

There are largely 2 types of errors that occur in appsmith

Syntax Errors

These errors occur due to the user entering a value that is not compatible with the systems syntax specification. Since these errors violate a system constraint, they are detectable by the system and can be reported proactively. These errors are largely static and can be immediately reported.

The core problems of syntax errors are:

Logical Errors

These are errors that occur due to the user making a logical mistake in their configuration such as missing a check or not enabling a certain configuration. Their inputs are all valid but do not result in their intended outcome which cannot be detected by the system because the user's intention cannot be gauged.

The core problems of logic errors are:

Solutions

  1. Syntax Linting
  2. Error console with clear messaging and CTAs
  3. Application log with the changes in states
  4. Entity relationships
  5. Improved error messaging

Items not in the scope

Links

https://miro.com/app/board/o9J_kivj-zU=/ https://www.figma.com/file/EdC0j0XwxyC9Flqzxyoxuf/Debugger?node-id=387%3A670

Nikhil-Nandagopal commented 3 years ago

Console Logs (Dynamic Errors)

Problems (static config errors)

Nikhil-Nandagopal commented 3 years ago

Things yet to figure out

ofpiyush commented 3 years ago

Updates from conversation with Nikhil:

Updates from conversation with Hetu: Property paths from widgets can be figured out today from the invalidProps, we'll need to add the ability to mark action execution being valid or broken.

Relationships: Find Usages & Find References (Who all are updating me and who all am I updating)

This is present in redux state now, we can pick it up whenever we feel the need to display it.

Nikhil-Nandagopal commented 3 years ago

@akash-codemonk adding a list of issues to solve in the debugger Issues: