Working on an Apex Code Debugger

OP
OP
phatduckk

phatduckk

Well-Known Member
View Badges
Joined
Jul 21, 2019
Messages
806
Reaction score
961
Location
San Mateo, CA
Rating - 0%
0   0   0
Nice. I did find two bugs with the explore but the one can be ignored as it was being caused by something you’re not suppose to do in apex

1) bug 1 - the search feature looks be doing a wildcard string search. But if the outlet name is simple then it finding all items that only contain the wording. Given the coding in an apex does not allowthe sensor/outlet/ etc, name to be the last word in a line. You may need to add a space to the ending of the word being search. For example I have an outlet called “uv” only. When I click on it I see outlets that contain UV in the wording too but not directly related. You may have to search for “[name](actual space)” ie “UV “ to allow the space to server as a delimiter.

Other bug was actually because this identified that I actual had two outlets named the same, a physical and a control outlet from my MXM ….KUDOS to that. Was acting weird when I clicked on it. In this case I renamed one as you shouldn’t have two with same name.
done + gave u a shout out
 
OP
OP
phatduckk

phatduckk

Well-Known Member
View Badges
Joined
Jul 21, 2019
Messages
806
Reaction score
961
Location
San Mateo, CA
Rating - 0%
0   0   0
Nice. I did find two bugs with the explore but the one can be ignored as it was being caused by something you’re not suppose to do in apex

1) bug 1 - the search feature looks be doing a wildcard string search. But if the outlet name is simple then it finding all items that only contain the wording. Given the coding in an apex does not allowthe sensor/outlet/ etc, name to be the last word in a line. You may need to add a space to the ending of the word being search. For example I have an outlet called “uv” only. When I click on it I see outlets that contain UV in the wording too but not directly related. You may have to search for “[name](actual space)” ie “UV “ to allow the space to server as a delimiter.

Other bug was actually because this identified that I actual had two outlets named the same, a physical and a control outlet from my MXM ….KUDOS to that. Was acting weird when I clicked on it. In this case I renamed one as you shouldn’t have two with same name.
I think bug 1 is fixed. I squeezed it in between other stuff and didn't really bang at it too hard but at a glance it was working.

Also updated the readme and gave u a shoutout for the feedback
 

Tangdora

Well-Known Member
View Badges
Joined
Feb 8, 2020
Messages
724
Reaction score
395
Rating - 0%
0   0   0
I think bug 1 is fixed. I squeezed it in between other stuff and didn't really bang at it too hard but at a glance it was working.

Also updated the readme and gave u a shoutout for the feedback
The bug 1 dose look to be fixed but one small tweek. Feel free to leave the current and stack the boxes if want. But the current code you are now showing on the far right now is the code block of the reference line in the middle that you click on. So is basically showing itself . Was actually hoping to see the coding of what ever you click on in the far left that highlighted in orange.

So example if I click on my temp on far left. The new code block would show that block of code for the actual temp probe. Which may show ….. 77 < temp < 79 ( not real formatting ). The reference section in the middle shows me the temp is used say in my notification outlet which say us displaying 78 < temp < 81. In this staged bug example the Lower end of my notification is not set outside the scope of my temp control range.

Also a bug in your original checker though may be a lot more difficult to debug against some else unit. But as of 1am right now line 36 in my code shown is the active line being evaluated. And outlets for both lines 35 and 37 and are current in an off state. May be an offseting issue.
 

Attachments

  • IMG_2913.jpeg
    IMG_2913.jpeg
    163 KB · Views: 47
OP
OP
phatduckk

phatduckk

Well-Known Member
View Badges
Joined
Jul 21, 2019
Messages
806
Reaction score
961
Location
San Mateo, CA
Rating - 0%
0   0   0
The bug 1 dose look to be fixed but one small tweek. Feel free to leave the current and stack the boxes if want. But the current code you are now showing on the far right now is the code block of the reference line in the middle that you click on. So is basically showing itself . Was actually hoping to see the coding of what ever you click on in the far left that highlighted in orange.

So example if I click on my temp on far left. The new code block would show that block of code for the actual temp probe. Which may show ….. 77 < temp < 79 ( not real formatting ). The reference section in the middle shows me the temp is used say in my notification outlet which say us displaying 78 < temp < 81. In this staged bug example the Lower end of my notification is not set outside the scope of my temp control range.

Also a bug in your original checker though may be a lot more difficult to debug against some else unit. But as of 1am right now line 36 in my code shown is the active line being evaluated. And outlets for both lines 35 and 37 and are current in an off state. May be an offseting issue.
I bet the bug has to do with "on" vs evaluating a value... I'll take a look at that. good find...

started working on themes LOL

1775970862449.png


but its probably a waste of time... what I should actually work on is making a way to organize the widgets... so you can have multiple tabs/pages of widgets so they're nice and easy to see/find/get-to...

Im thinking something like a tab for "stuff in my sump"... or a tab for "auto water change things".

hmmmm - how do I wanna do that
 
OP
OP
phatduckk

phatduckk

Well-Known Member
View Badges
Joined
Jul 21, 2019
Messages
806
Reaction score
961
Location
San Mateo, CA
Rating - 0%
0   0   0
The bug 1 dose look to be fixed but one small tweek. Feel free to leave the current and stack the boxes if want. But the current code you are now showing on the far right now is the code block of the reference line in the middle that you click on. So is basically showing itself . Was actually hoping to see the coding of what ever you click on in the far left that highlighted in orange.

So example if I click on my temp on far left. The new code block would show that block of code for the actual temp probe. Which may show ….. 77 < temp < 79 ( not real formatting ). The reference section in the middle shows me the temp is used say in my notification outlet which say us displaying 78 < temp < 81. In this staged bug example the Lower end of my notification is not set outside the scope of my temp control range.

Also a bug in your original checker though may be a lot more difficult to debug against some else unit. But as of 1am right now line 36 in my code shown is the active line being evaluated. And outlets for both lines 35 and 37 and are current in an off state. May be an offseting issue.
hmmmmm my hunch was wrong

1775971219760.png



Next time that happens can you please:
  1. go to http://apex.local/rest/config?_=<TYPE GIBERISH HERE>
  2. copy the giant blob of json & send it to me?
    1. you can plop it over at https://pastebin.com/ and send me the URL, DM me a google drive link, whatever works
 

Tangdora

Well-Known Member
View Badges
Joined
Feb 8, 2020
Messages
724
Reaction score
395
Rating - 0%
0   0   0
I bet the bug has to do with "on" vs evaluating a value... I'll take a look at that. good find...

started working on themes LOL

1775970862449.png


but its probably a waste of time... what I should actually work on is making a way to organize the widgets... so you can have multiple tabs/pages of widgets so they're nice and easy to see/find/get-to...

Im thinking something like a tab for "stuff in my sump"... or a tab for "auto water change things".

hmmmm - how do I wanna do that
PMed you a copy, I was exploring the app a few mins ago to see if it was possible to show the organization tree of the all the module in order to see if if could should exactly which is connected to what. But the app does not give that info. Now that i have this json though ill comb through that to see if those relationships are shown behind the scenes
 
OP
OP
phatduckk

phatduckk

Well-Known Member
View Badges
Joined
Jul 21, 2019
Messages
806
Reaction score
961
Location
San Mateo, CA
Rating - 0%
0   0   0
PMed you a copy, I was exploring the app a few mins ago to see if it was possible to show the organization tree of the all the module in order to see if if could should exactly which is connected to what. But the app does not give that info. Now that i have this json though ill comb through that to see if those relationships are shown behind the scenes
I didn’t see them there but I wasn’t looking for it either. I bet we can find it tho. But for now… bed
 
OP
OP
phatduckk

phatduckk

Well-Known Member
View Badges
Joined
Jul 21, 2019
Messages
806
Reaction score
961
Location
San Mateo, CA
Rating - 0%
0   0   0
PMed you a copy, I was exploring the app a few mins ago to see if it was possible to show the organization tree of the all the module in order to see if if could should exactly which is connected to what. But the app does not give that info. Now that i have this json though ill comb through that to see if those relationships are shown behind the scenes
ok we need apex.local/cgi-bin/status.json too. The DID for the VTAFSTimer is Cntl_B3. Cmd+F Cntl_B3 and you'll see something like

Code:
{
        "did": "Cntl_B3",
        "type": "bla bla",
        "name": "VTAFSTimer",
        "value": xxxxxxxxx
      },


whats the value when this bug happens? or send me that whole little json block.

Also worth noting I updated the debugger to show the value when you mouse over the line number in the code editor.

1776024873916.png


so you can update the extension and try that too. Its worth checking both in case the debugger is showing something wrong (aka another bug)
 
OP
OP
phatduckk

phatduckk

Well-Known Member
View Badges
Joined
Jul 21, 2019
Messages
806
Reaction score
961
Location
San Mateo, CA
Rating - 0%
0   0   0
Oh look - multiple folders on the apex dashboard. You can now have as many dashboard "folders" as you want... (now that I typed it out I realized I should rename this stuff to Dashboard, duh)

Anyways - its cool and it works (still have to test more)

check it out

 

Tangdora

Well-Known Member
View Badges
Joined
Feb 8, 2020
Messages
724
Reaction score
395
Rating - 0%
0   0   0
ok we need apex.local/cgi-bin/status.json too. The DID for the VTAFSTimer is Cntl_B3. Cmd+F Cntl_B3 and you'll see something like

Code:
{
        "did": "Cntl_B3",
        "type": "bla bla",
        "name": "VTAFSTimer",
        "value": xxxxxxxxx
      },


whats the value when this bug happens? or send me that whole little json block.

Also worth noting I updated the debugger to show the value when you mouse over the line number in the code editor.

1776024873916.png


so you can update the extension and try that too. Its worth checking both in case the debugger is showing something wrong (aka another bug)

sent you two new files. Unfortunately when i hover over the number of the line that's highlighting wrong, its not displaying the current state . the coloring does not match last night either which had the same 35 line fully red but 37 box was green so that look to have self corrected as the line is not true

1776056176059.png


1776055734011.png
 

Tangdora

Well-Known Member
View Badges
Joined
Feb 8, 2020
Messages
724
Reaction score
395
Rating - 0%
0   0   0
also curious now your notes say grey number are becuase there are not values status json, but i see the values in mine

1776056664833.png


1776056601067.png
 
OP
OP
phatduckk

phatduckk

Well-Known Member
View Badges
Joined
Jul 21, 2019
Messages
806
Reaction score
961
Location
San Mateo, CA
Rating - 0%
0   0   0
also curious now your notes say grey number are becuase there are not values status json, but i see the values in mine

1776056664833.png


1776056601067.png
Grey more or less means "haven't tried handling this case yet". I have no programming with watts/amps so that would explain that. ill add some stuff later and fix that - iu actually have an Apex hardware failure im dealing with so im in tank emergency mode now. yay
 
OP
OP
phatduckk

phatduckk

Well-Known Member
View Badges
Joined
Jul 21, 2019
Messages
806
Reaction score
961
Location
San Mateo, CA
Rating - 0%
0   0   0
sent you two new files. Unfortunately when i hover over the number of the line that's highlighting wrong, its not displaying the current state . the coloring does not match last night either which had the same 35 line fully red but 37 box was green so that look to have self corrected as the line is not true

1776056176059.png


1776055734011.png
ill have it spit out some logs later today. It's pretty hard debugging this async. Hopefully ill have something later today that spits out what its doing for each line - that'll give us some point in time data to look at & understand
 

Chuck_e

Active Member
View Badges
Joined
Jan 14, 2024
Messages
121
Reaction score
134
Location
Sherwood Park
Rating - 0%
0   0   0
OK, you two - this looks awesome! Not sure I have anything to add to the discussion but want to keep this thread in my list so that I can digest it later when I have more time...
 
OP
OP
phatduckk

phatduckk

Well-Known Member
View Badges
Joined
Jul 21, 2019
Messages
806
Reaction score
961
Location
San Mateo, CA
Rating - 0%
0   0   0
Hectic morning. I had an AFS hardware failure that took down half my system. Neptune support kicked butt diagnosing it. Props to them

Anyways @Tangdora - I’ll take a look at your comments after work (maybe at lunch if I can squeeze it in). Should be fixable. I’ll get some logs spit out in a new update to get us to the right place.
 
OP
OP
phatduckk

phatduckk

Well-Known Member
View Badges
Joined
Jul 21, 2019
Messages
806
Reaction score
961
Location
San Mateo, CA
Rating - 0%
0   0   0

Tangdora

Well-Known Member
View Badges
Joined
Feb 8, 2020
Messages
724
Reaction score
395
Rating - 0%
0   0   0
ok so new issues

now i get a line at the top that tell me what line causing issue. i guess you added that. 36 is the correct line now though. But when i scroll down to the line it stops highlighting and tells a different message . Counsel window below. But getting a see of red errors

1776142557344.png


1776142010879.png

1776142083066.png
 
OP
OP
phatduckk

phatduckk

Well-Known Member
View Badges
Joined
Jul 21, 2019
Messages
806
Reaction score
961
Location
San Mateo, CA
Rating - 0%
0   0   0
Link doesn't work anymore, got a new one?
I started working on some features that I want to really make sure are solid before others played with it ... TLDR I added the ability to create multiple dashboards (and other cool stuff) & really want to make sure it didn't accidentally mess with the "standard" dashboard & functionality... more so since it now works on apexfusion.com too.

anyways - here's a quick tour of the new stuff:
 

TOP 10 Trending Threads

HOW DO YOU ADJUST YOUR CUC AS ALGAE DISAPPEARS?

  • Capture and re-home CUC

    Votes: 10 8.3%
  • Increase white light/hours in tank to spur algae growth to feed CUC

    Votes: 8 6.6%
  • Feed nori to support CUC

    Votes: 39 32.2%
  • Feed herbivore pellets to support CUC

    Votes: 43 35.5%
  • Allow attrition to balance CUC and algae

    Votes: 52 43.0%
  • Provide macro algae to feed CUC

    Votes: 8 6.6%
  • Introduce CUC predators

    Votes: 1 0.8%
  • Other (please explain)

    Votes: 12 9.9%
Back
Top