![]() |
Forum Index : Microcontroller and PC projects : CMM2: V5.05.06RC18 - Improved debugging
Author | Message | ||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10310 |
V5.05.06RC18 http://geoffg.net/Downloads/Maximite/CMM2_Beta.zip This release contains a new capability to help you debug your Basic programs There is a new directive #MMDEBUG and new command MMDEBUG #MMDEBUG directive. This has two forms #MMDEBUG ON and #MMDEBUG OFF. By default #MMDEBUG is off. These can appear anywhere in the program and are used by the program loader. If #MMDEBUG is OFF (default condition) then any lines starting with the command MMDEBUG are ignored (effectively treated as comments) and will have absolutely zero impact on program performance - they are simply not loaded into program memory. If #MMDEBUG is on then lines starting MMDEBUG are included in the program and the MMDEBUG command will be executed as follows MMDEBUG command By default the MMDEBUG command acts exactly like the PRINT command so you can use it liberally throughout your program during development and know that by simply setting #MMDEBUG OFF or removing any #MMDEBUG directives, your program will run normally without any impact on performance. The second form of the MMDEBUG command is MMDEBUG BREAK in this case you get a command prompt DEBUG> Here you can execute any normal MMBASIC commands as though you were at the normal command prompt allowing you to change any variables, print them, or execute any other user subroutines or built in commands. Of course these should only be things that make sense at the command line (e.g. GOTO would be a BAD idea) To exit this mode then use the command CONTINUE MMDEBUG commands not at the start of a line will be included in the program and executed regardless Hopefully this will make program development a bit easier Don't even think about asking for single stepping - it won't ever happen ![]() Edited 2020-11-13 23:49 by matherp |
||||
William Leue Guru ![]() Joined: 03/07/2020 Location: United StatesPosts: 405 |
Excellent! Thanks, Peter! -Bill |
||||
markboston36 Regular Member ![]() Joined: 27/10/2020 Location: United StatesPosts: 76 |
why not single stepping? it would seem to me to be very useful to step through code one line at a time and see where its tripping up. |
||||
PeteCotton![]() Guru ![]() Joined: 13/08/2020 Location: CanadaPosts: 543 |
![]() ![]() ![]() ![]() ![]() |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
I doubt Peter was commenting on the desireability of such a feature, only on the feasibility of implementing it ontop of the existing MMBasic / firmware architecture. That said, the majority of the time when when Peter says he can't / won't do something he generally then proceeds to do it within 24 hours ... However I do not expect that will be the case this time. Best wishes, Tom Edited 2020-11-14 03:26 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
RetroJoe![]() Senior Member ![]() Joined: 06/08/2020 Location: CanadaPosts: 290 |
This is yet another great enhancement, Peter...but the CMM2 documentation gap is getting wider with every increment of the RC version number. Any idea when you will release 5.0.6 and update the docs accordingly? Or, are there WIP versions of the 5.0.6 documentation available somewhere? I would really love to have a printed "baseline" MMBasic reference manual in my hands again :) Edited 2020-11-14 03:39 by RetroJoe Enjoy Every Sandwich / Joe P. |
||||
William Leue Guru ![]() Joined: 03/07/2020 Location: United StatesPosts: 405 |
+1 on the need for an updated manual. I printed the manual that came with 5.05.06RC15. It was titled '5.05.05' but did contain some 5.05.06 features, I think, but not all of them. I have been supplementing the manual by printing out The Back Shed posts, mostly from Peter, and appending them to a growing book of my own. Yes, I know this is old-fashioned, but I much prefer a printed manual: true, there is no search feature, but I have mine filled with tons of marginal notes, including code snippets, and this makes it worthwhile for me. -Bill |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
I try and keep this up to date. It was done as part of MMEdit but I decided to make it available for all. It can be hard keeping up with Peter at times but I am trying and now it's there, keeping up (and fixing my stuff-ups) will be easier. I will have a MMDEBUG page in a couple of hours. Breakfast comes first! https://www.c-com.com.au/mmhelp/index.htm It is syntax help only and does not have any tutorials or general information. It covers all Maximite/Micromites so there are pages that are not relevant to the CMM2. Jim VK7JH MMedit |
||||
LeoNicolas![]() Guru ![]() Joined: 07/10/2020 Location: CanadaPosts: 504 |
Again, an amazing Peter job. How Peter is being paid for all this work? Is it only with the CMM2 selling profit? Can I make a donation? |
||||
RetroJoe![]() Senior Member ![]() Joined: 06/08/2020 Location: CanadaPosts: 290 |
First off, cognitive research shows that “old fashioned” hard-copy printed material and hand-written notes both reinforce learning and retention. Second, the MMBasic command and function references are in alphabetical order, so think it’s a toss-up how quickly you can flip to the right page versus doing a full text search (and, making notes in the margins about them is invaluable!). Third, while it’s reasonably convenient to bring a help window to the foreground if you’re working on the same platform, with the CMM2 you are obliged to go to a second screen, or do some fussy monitor input switching,, which is annoying and disruptive to mental “flow”. Lastly, printed documentation “just feels right” when you are working in BASIC ! I’ve often wondered about that myself. AFAIK, most of what goes on in the MaxiMite Universe is a non-profit labor of love. I gather many people here use the MM platform to implement custom microcontroller projects for their customers or the companies they work for, and I imagine the handful of MM HW vendors worldwide make a (very) modest profit fabricating the PCBs, kits and fully-assembled units. Overall, though, I imagine this is what the “Homebrew Computer Club” must have been like in the early 1970s - personal computer hobbyists doing what they love doing and eager to share their knowledge. Jim, exactly to my point above...and where have you been all my life?! Did I miss this earlier, or did you just make it available now? In any case, this is awesome ! A quick syntax check is often all you need, and it’s nice to see all the non-CMM2 stuff as well - the MaxiMite Universe seems infinite :) Thanks very much for this great additional resource. Edited 2020-11-14 07:50 by RetroJoe Enjoy Every Sandwich / Joe P. |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10310 |
I'm not. I don't want to be. I don't make anything from and sales of anything. Just want the effort to be enjoyed. Coming tomorrow another performance improvement - a new record ![]() ![]() ![]() |
||||
RetroJoe![]() Senior Member ![]() Joined: 06/08/2020 Location: CanadaPosts: 290 |
Peter, I'm just spitballing here, but I think you can cross that item off your bucket list :) Enjoy Every Sandwich / Joe P. |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
MMEdit has had syntax help for 9 years so no, it's not new. The previous system I used was not suitable for the ever increasing range of devices so I changed to HTML. The change to HTML is what made it feasible to have the files available outside MMEdit. I work slowly so it has taken a couple of months to get into a usable form. Jim VK7JH MMedit |
||||
vegipete![]() Guru ![]() Joined: 29/01/2013 Location: CanadaPosts: 1132 |
(RC18) Strange behaviour with MATH SET: This one causes a crash. Yes, the manual says the array should be specified as a() but... dim a(10,10) math set 0,a(10,10) This one works in an undocumented manner, but does not crash. Array elements 5 to 10 are set to the value. Array elements 0 to 4 are untouched. dim a(10) math set 3,a() math set 9,a(5) for i = 0 to 10 print a(i), next Also, I've been seeing an increased number of cases lately of keys repeating in the editor. This is most annoying when I'm forward deleting some characters on a line and suddenly the first half of the line gets gobbled before I can mash some keys to make it stop. Of, course, I can't figure out what combination of actions makes it happen... Visit Vegipete's *Mite Library for cool programs. |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3378 |
I didn't know about this. What a great resource, Jim. Thanks very much. Yikes. How amazing is that? How do you keep 'em coming? Profound thanks for all the improvements to this wonderful microcomputer ecosystem. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
LeoNicolas![]() Guru ![]() Joined: 07/10/2020 Location: CanadaPosts: 504 |
The only thing I can say is you are an amazing person doing an amazing job. Thank you so much |
||||
jirsoft![]() Guru ![]() Joined: 18/09/2020 Location: Czech RepublicPosts: 533 |
Hi Peter, really amazing job! Until now no problem in EDITOR and speed is fantastic... Jiri Napoleon Commander and SimplEd for CMM2 (GitHub), Â CMM2.fun |
||||
mkopack73 Senior Member ![]() Joined: 03/07/2020 Location: United StatesPosts: 261 |
Awesome! This will be REALLY helpful when writing and debugging code. Can literally just load up a ton of these in your code during development and not have to go nuts removing in them to then test for performance once you get things working. |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |