Debug tricks

Is any debugging trick you can share ?? I came from php and Dreamweaver and I use die command or print_r to debug line by line.

Is any trick you can share for nodejs?? Sometimes I get and error and the only thing is to begin deleting components until I get app running and start from that.

Maybe this will help:

Otherwise, vote here:

1 Like

I don’t delete server action steps, I just disable them…

To create structure I sometime put a whole bunch of steps in an if-then-else with a condition of {{true}} which can help with the disabling strategy…

… or I may have a variable called {{debug}} which I set to 1 or 0 and bring into the logic as required…

I often find it very useful to see the actual queries as they’re executed. Obviously you’ll need to have access to the query log. You can use Wappler’s terminal to display the queries as mentioned here or use a text editor. (I use one which automatically monitors changes to the log file and jumps to the last line in the file.)

It really depends which part of your app do you want to debug - front end errors, server connect errors, database query errors etc.

1 Like

For example front end I add a dmx-bind:href with a null object and I get this.

But take me maybe one hour to discover where was that. Is nothing that says in line 55 or this element.??

I can’t answer this question by just looking at this error message and without actually seeing your page running in my browser.

@Teodor, he’s not looking for you to diagnose this problem

In reality, what he wants to know (see quote) is if there is any debugging support within Wappler’s framework that would say “hey, we have an error in expression xyz” instead of throwing such a JS error

I also take this opportunity to answer to @Chackmool, no, sadly there isn’t such functionality yet

2 Likes

Expression errors are logged in devtools console. But only if there is really a syntax error.

If data is just empty, you will get an empty result with no error.

Furthermore app connect data can be explored in devtools when querying the dmx.app.data object.

Note that the data structure has changed a bit with App Connect 2 so you have to expand the internal proxy objects and then [[Target]] to see the data

@George can you expand on this a little bit? Maybe with a couple of examples?

Pretty much the same as before, the only thing is now you have to expand [[Target]] in the tree to see component properties:

2 Likes