|
I found a bug in my UIX library having to do with DMA and multiple transfer buffers. It only reproduces on one platform. I've narrowed it to a specific process, but I still don't know why it halts. It doesn't do it right away, so it's an intermittent problem. The best kind.
*cracks knuckles*
Edit: Fixed the bug.
Prior to working on lil embedded widgets I was spoiled. I had numerous ways to do forensics on my running code, not the least of which was a debugger.
I don't typically have a debugger anymore, and while it's possible to use debug probes with embedded gear they're usually so slow that I want to get out and push.
Now since I don't have one, I've been forced to think more clearly about how my code runs and what it's doing at runtime at any given point.
One day a guy told me GFX was failing after a couple of days when writing text. I immediately narrowed it mentally to three places within a labyrinth of code, with a most likely culprit that turned out to be the thing. I knew it because it smelled like heap frag and I was right.
That's just one example. The opener of this post is another, assuming I'm right about it (I am)
A few years ago I wouldn't have been able to do that.
I'm super glad for these new abilities. It feels a bit like a superpower.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
modified 5 days ago.
|
|
|
|
|
Yes, back in the day we either had no debugger or one which was unusable (I'm looking at you, OpenVMS).
A developer must know how to debug without a debugger and must know when to use one and when not to.
90% of bugs don't require a debugger, just common sense.
|
|
|
|
|
I've been coding since '86 so I cut my teeth on programming without a debugger. However, my code was much simpler because my machines were at best 2MHz 16 bit lil monsters with 256KB of RAM at best a 1.44MB floppy. Now my little widgets often have megabytes of program storage, gobs more RAM and run at hundreds of MHz or even GHz speeds. That and I didn't have C and C++ available. I was using Pascal, BASIC and assembly.
It's a different world. My code is so much more complicated now. I have threading to contend with, including multiple cores in many cases, several different ways of doing wireless comms, and an entire Internet to talk to. Things are just different now.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
One of my university professors was talkin about 'debugging by cranial massage'
That was in 1977. The standard debugging method was adding console output statements in the appropriate places - which takes a lot of practice. It gave me a valuable 6th sense in where to place breakpoints in more recent debuggers: Several times, people looking over my shoulder asked 'Why do you put the breakpoint there?' I answered honestly: 'Dunno. It may be a good place for looking around' - and it was.
I didn't see a decent debugger until around 1980. Some of the features of that one, I still miss: You could single step by function call rather than by line. And you could set the range for single stepping (by call or line), e.g. to a single function or module - or set in a large unit and reset in subrange within that module, leaving step breakpoints only in the interesting parts. There may be other debuggers with these features, but none of those I have been using over the years.
Of course it was missing a lot that we take for granted today, and it obviously was CLI and not GUI oriented, so I wouldn't want it back in its original form. I still wish we could pick some features from that old software and add them to today's debuggers!
Religious freedom is the freedom to say that two plus two make five.
|
|
|
|
|
trønderen wrote: The standard debugging method was adding console output statements in the appropriate places
This is my life now. And it has similarly honed my abilities.
trønderen wrote: I still wish we could pick some features from that old software and add them to today's debuggers!
Absolutely.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
Now we have "Time Travel" debuggers which I have attempted on several occasions and always failed.
|
|
|
|
|
BernardIE5317 wrote: "Time Travel" debuggers
TARDIS and sonic screwdriver not included.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Maybe that is why I failed.
|
|
|
|
|
This is an interesting perspective. I agree that debuggers (and profilers) tend to influence the result often to the point of being unable to reproduce the issue. I still use debuggers and profilers, but I try to detect issues more proactively.
I generally instrument code and send live updates to a web page hosted by the application. It's more than a live logger; it monitors performance, exceptions, memory, and resources. Those items are visual and time-tagged, so I can often pinpoint the guilty party of misbehavior while it's happening and before the system goes sideways.
So, I agree that debuggers aren't always the approprate debugging tool. Our problem-solving toolboxes should be a little deeper than just a debugger.
Keith Rule
|
|
|
|
|
I had been programming for 5 years before I even heard of a debugger. Early debugging was reading core dumps (can you think how many pages they would take now), and stepping through the code by putting the processor in single-step mode and reading the lights on the console in binary to see what was happening. The only input devices were punched cards and console switches. The outputs were lights on the console, punched cards, and a line printer.
|
|
|
|
|
Yeah, I started coding without debuggers too.
The difference is my code.
In 1986 I was writing little, relatively simple applications. A checkbook balancer. Some stick figure animations. A few games. Stuff like that.
I didn't really need a debugger. My code and data typically had to fit in 64KB.
That's not the case now, even on embedded.
It's far more difficult to conjure a working mental model of my modern code at runtime, even if it is written better, and more properly organized. The reason is simple complexity. Getting good at building and then traipsing through my mental model of my modern code at runtime is what I'm getting at.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
I would hate this.
It would probably be good for me.
I lean heavy on the whole fast build and see if it goes and correct what doesn't. I'm sure some could watch a recording and think it spaghetti chucking.
Intellisense has gotten progressively worse with the verbosity of its descriptions because of the brigade against all code comments (maybe especially the XML ones). So you get method definitions from nugets where even if it's clear how you should call something, exactly what's going to happen when you do is a scientific endeavor of experimentation. Maybe it's exactly spaghetti chucking, but what other way is there to decode these black boxes?
|
|
|
|
|
I installed VB6 and got some old stuff running![^]
That's about three days in lost productivity, so I hope it will be worth it
Registering the COM Callable Wrapper was a pain and took most of the time.
I needed to run regasm.
The trick was in setting the /codebase parameter, which shows an error, but still does something that made it work
Also running it with the -tlb switch somehow works miracles.
For anyone who may have to do this sometime:
regasm -tlb C:\Windows\SysWOW64\MyCCW.dll
regasm C:\Windows\SysWOW64\MyDLL.dll /codebase /tlb:C:\Windows\SysWOW64\MyCCW.tlb The VB6 codebase has a total size of 1.63GB, plus VB6, which is another 3.77 GB, makes it 5.4 GB.
The VM I needed to run it was a staggering 203 GB, which takes quite a chunck out of my 1 TB drive
It now sits safe in some external storage (I don't dare delete it yet)
That alone should be worth it
|
|
|
|
|
A Tip/Trick in the works?
|
|
|
|
|
Congrats, Sander.
Now if only you could figure out how to get the original Minesweeper installed on Windows 10/11!
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
VM with a Windows 98
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Don't know if you're serious, but done that for my aunt that absolutely despises windows 10/11 ad ridden games.
If you are serious, look at win7games.com, it has an installer for the old games that works in win 10/11. The only caveat I found is that windows update sometimes deletes the games and it needs a reinstall ![Smile | :)](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
Sander Rossel wrote: regasm
Wow, the memory of old tools that I have long since forgotten...
It's amazing how we can be intimately familiar with certain tech & then never think about it again, unless someone mentions it.
There are some things I'm glad to forget too. ![Roll eyes | :rolleyes:](https://www.codeproject.com/script/Forums/Images/smiley_rolleyes.gif)
|
|
|
|
|
I feel for you! Around half of my company's codebase 1.7M LOC (100+ apps) is in VB6. The difference is, I didn't inherit it, I created it. Migration efforts have been very slow as new projects take precedence and there really is no payoff (besides technical debt) when the legacy apps continue to work on the latest MS OS.
The biggest hurdle you are likely to face (if you are actually trying to get those projects running in VB6/debug) is older third-party components without an installer. Good luck and have fun!
"Go forth into the source" - Neal Morse
"Hope is contagious"
|
|
|
|
|
Wordle 1,062 3/6
🟩🟩🟩🟩⬜
🟩🟩🟩🟩⬜
🟩🟩🟩🟩🟩
so close...
|
|
|
|
|
Wordle 1,062 3/6
🟩🟨🟩🟨⬜
🟩🟩🟩🟩⬜
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 1,062 4/6*
🟨⬜⬜🟨⬜
🟨🟨⬜🟩🟨
🟩🟩🟩🟩⬜
🟩🟩🟩🟩🟩
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Wordle 1,062 5/6
🟨⬜⬜⬜⬜
⬜🟨🟨⬜⬜
🟩🟩🟩⬜⬜
🟩🟩🟩⬜⬜
🟩🟩🟩🟩🟩
|
|
|
|
|
⬜⬜🟩⬜⬜
⬜⬜⬜⬜🟨
⬜⬜🟩🟨⬜
🟩⬜🟩⬜⬜
🟩🟩🟩⬜⬜
🟩🟩🟩🟩🟩
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
Wordle 1,062 4/6*
🟨🟨⬜⬜🟨
🟨🟨🟨⬜⬜
⬜⬜🟨🟨🟩
🟩🟩🟩🟩🟩
Happiness will never come to those who fail to appreciate what they already have. -Anon
And those who were seen dancing were thought to be insane by those who could not hear the music. -Frederick Nietzsche
|
|
|
|