|
Post by johnno56 on May 17, 2019 7:39:23 GMT -6
If I am using the RCBasic IDE and my program crashes - as they normally do... lol - it would be nice if an actual error message (with explanation) would be displayed. Or at least output the message to a log file.
J
|
|
|
Post by n00b on May 17, 2019 10:10:46 GMT -6
It has some pretty detailed compile errors but its runtime errors are only in regards to built-in functions or subs. This is actually because of the terrible programming habbits I have built up over time. I don't actually use debuggers, not even when developing rcbasic itself. I have always traced bugs by using arbitrary break points and printing the values of variables at different points where I think errors are happening.
I will add a debugging feature to my list of things to add in future updates. It might take a while though.
|
|
|
Post by tbird on May 17, 2019 11:01:42 GMT -6
Dont feel bad n00b I do exactly the same thing my debugging is print commands my framework spits out dozens before it even starts then I always know where the error is.
|
|
|
Post by johnno56 on May 17, 2019 18:11:39 GMT -6
The reason: I mainly use Geany as my IDE. I am trying to convert an sdlbasic game and Geany pops up error messages - as it usually does... lol - and either displays a 'segmentation fault' or a 'dump'. Both of which tell me nothing. But, if I run it using RC's editor and an error pops up, it just sits there staring at me... lol
In either case, the fault is mine and is a reflection on my lack of skills, but I am used to that... lol It's not a 'deal breaker' but an error system would be nice. Besides... How better to learn RC by combing through code looking for 'random features'? lol
|
|
|
Post by tbird on May 17, 2019 18:52:33 GMT -6
Print commands in the meantime will save alot of headaches lol
|
|
|
Post by n00b on May 17, 2019 19:13:15 GMT -6
If you are getting a segfault its probably because you are using a higher array index than you allocated.
|
|
|
Post by johnno56 on May 17, 2019 20:40:54 GMT -6
Yeah. I'm beginning to figure that one out. My program uses arrays and some of those are populated with random numbers. RC and SDL give different results. Rand(10) will produce 0 to 9 whereas SDL will produce 1 to 9. Therefore: If I want a number from 1 to 10: RC would be rand(10) + 1 and SDL would be rnd(11)... Now my brain hurts again... Too much without caffeine...
|
|