Author Topic: Has $Debug been working well for you?  (Read 25761 times)

0 Members and 1 Guest are viewing this topic.

Offline doppler

  • Forum Regular
  • Posts: 241
    • View Profile
Re: Has $Debug been working well for you?
« Reply #30 on: March 10, 2022, 08:00:54 am »
Debug for me works very well.

With all the little bits added to every executed line.  Which make debugging possible. I don't know if I am assuming something wrong.  Unless I remark the $debug line at the top.  Every execute module produced will be debugging enabled.

I suggest an change to the QB64 IDE drop down.  Instead of only make EXE option (F11).  Another option of make EXE with debug disabled.  This way I don't need to comment out the $debug to create a tight EXE.

Offline Dimster

  • Forum Resident
  • Posts: 500
    • View Profile
Re: Has $Debug been working well for you?
« Reply #31 on: March 10, 2022, 08:27:26 am »
@OldMoses & @FellippeHeitor - thanks guys for that series of Q&A - I had not realized that ctrl+T or single click + shift worked as they do. Nor did I realize I could toggle on/off the debug metacommand. Wonder if @SMcNeill will have a chapter on those key control short cuts?

FellippeHeitor

  • Guest
Re: Has $Debug been working well for you?
« Reply #32 on: March 10, 2022, 08:34:13 am »
@Dimster glad it's been useful!

@doppler The intention is really to get you to remove $Debug once you're done coding.

Thank you for your feedback.

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Has $Debug been working well for you?
« Reply #33 on: March 10, 2022, 08:40:31 am »
Wonder if @SMcNeill will have a chapter on those key control short cuts?

I hope to, just as soon as I get a little time once again.  As you guys probably all know, (I'm certain I mentioned it at least a few times), my mother passed away back in January.   My brother, being the dope head drunkard that he is, needs the money from her estate RIGHT NOW -- heck, yesterday even!! -- and he's being a complete PITA with everything.  We've found a buyer for mom's estate (and we're dumping it for $180k, when it's estimated to be worth $300k, just to push everything through as quickly as possible so we can basically be done with it and with him), and if all goes well, the final sell and transfer of everything should go through on the 14th of this month.  (Monday -- I'm counting the days down!!)

As you can imagine, this rushed deadline has ate up almost any semblance of free time which I could pretend to have.  We've been clearing out all furniture.  Selling off whatnots.  Distributing family photos and mom's music books (I write novels; mom wrote songs)...  This past month has just been a complete and utter pain in my rear, and I'll be soooo happy once things settle down and calm down.

If all works well, I'm going to take a few weeks vacation after all this is finished, just to get away from it all.  (Depending on if the state of the world will allow for such extravagant things as traveling and affording the gas to go somewhere decent to enjoy the southernmost warmth and breezes, like the Florida keys.) 

After that (so some time around the start of next month), I hope to get back into writing and working on my QB64 bible and adding a lot more info to it.  A nice few chapters covering the IDE itself and all our hotkeys would definitely be nice to add into it at some point, but they're not in my "QB64 Bible" yet.  Maybe by summer, since I definitely didn't make much headway on things before Spring rolled around here... ;)
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Marked as best answer by on Today at 04:53:01 am

FellippeHeitor

  • Guest
Re: Has $Debug been working well for you?
« Reply #34 on: March 10, 2022, 08:45:05 am »
  • Undo Best Answer
  • @OldMoses I've reenabled clicking line numbers to select in the latest dev build when the "auto add $debug metacommand" is disabled. Please try it. https://qb64.org/index.php/development-builds/

    Offline OldMoses

    • Seasoned Forum Regular
    • Posts: 469
      • View Profile
    Re: Has $Debug been working well for you?
    « Reply #35 on: March 10, 2022, 01:14:05 pm »
    Thanks Fellippe, that works like old times and grabs the best of both worlds. Much appreciated.

    Offline Cobalt

    • QB64 Developer
    • Forum Resident
    • Posts: 878
    • At 60 I become highly radioactive!
      • View Profile
    Re: Has $Debug been working well for you?
    « Reply #36 on: March 11, 2022, 10:03:02 am »
    @Cobalt you do know you've asked me this before and that I did add it to the Debug menu, right?

    Took me a hot second to remember.

    Must have missed the memo...
    Granted after becoming radioactive I only have a half-life!

    FellippeHeitor

    • Guest
    Re: Has $Debug been working well for you?
    « Reply #37 on: March 11, 2022, 11:03:54 am »
    😂

    Offline hanness

    • Forum Regular
    • Posts: 210
      • View Profile
    Re: Has $Debug been working well for you?
    « Reply #38 on: March 11, 2022, 07:21:24 pm »
    Personally, I absolutely love the debug features. I have a program I've written that is over 11,000 lines at this point and every once in a while, tracking a problem is a royal pain in the backside. This has made my life much easier.

    FellippeHeitor

    • Guest
    Re: Has $Debug been working well for you?
    « Reply #39 on: March 11, 2022, 07:26:14 pm »
    That's great to hear, @hanness! Glad it's been useful!

    Offline mdijkens

    • Newbie
    • Posts: 34
      • View Profile
    Re: Has $Debug been working well for you?
    « Reply #40 on: March 14, 2022, 10:30:52 am »
    Just using Watchpoints and the condition can only be a simple one variable condition (which I understand from the nature of compiled code).

    Wouldn't it be great if there was also a $DEBUG metacommand to set a programmatic watchpoint in your code only to be executed during $DEBUG ?
    e.g. something like:
    Code: QB64: [Select]
    1. $Debug If a Mod 7 <> Sqr(b) And C = 0 then $DEBUG_BREAK
    or:
    Code: QB64: [Select]
    1. $DebugBreak When a Mod 7 <> Sqr(b) And C = 0

    This might be doable?

    It would also be possible if you can detect in code if running in debug-mode
    Code: QB64: [Select]
    1. $If $Debug Then
    2. MyWatchExpr1% = a Mod 7 <> Sqr(b) And C = 0
    And then put a normal watchpoint on MyWatchExpr1%
    « Last Edit: March 14, 2022, 10:42:09 am by mdijkens »
    ~ 2 million lines of BASIC

    Offline RhoSigma

    • QB64 Developer
    • Forum Resident
    • Posts: 565
      • View Profile
    Re: Has $Debug been working well for you?
    « Reply #41 on: March 14, 2022, 12:04:21 pm »
    Wouldn't $ASSERTS and the _ASSERT command serve for this kind of debugging https://wiki.qb64.org/wiki/$ASSERTS ??
    My Projects:   https://qb64forum.alephc.xyz/index.php?topic=809
    GuiTools - A graphic UI framework (can do multiple UI forms/windows in one program)
    Libraries - ImageProcess, StringBuffers (virt. files), MD5/SHA2-Hash, LZW etc.
    Bonus - Blankers, QB64/Notepad++ setup pack

    Offline mdijkens

    • Newbie
    • Posts: 34
      • View Profile
    Re: Has $Debug been working well for you?
    « Reply #42 on: March 14, 2022, 12:12:38 pm »
    Functionally yes, but not integrated with the new $Debug functionality.
    I would still use $ASSERTS for (debug) logging purposes.
    ~ 2 million lines of BASIC

    Offline Richard

    • Seasoned Forum Regular
    • Posts: 364
      • View Profile
    Re: Has $Debug been working well for you?
    « Reply #43 on: April 13, 2022, 11:14:06 am »
    Although not going into specifics here, it was/is a great help - although floating point handling, as already noted is (and probably always still will be) an issue (and not referring to FLOAT which is a "problem" in itself).

    Probably the best thing for me with $Debug was that it brought QB64 much closer to the already existing functionality of MS PDS 7.1 (upgrade to QB45) which I still use a lot (QB64 has a lot of catching up to what PDS could do).