Suggestion debug - IDE, take me to my code error

Rich

Well-known member
CX Code Contributor
3rd Party Module Dev
Tutorial Author
3rd Party Tool Dev
Joined
Sep 9, 2017
Messages
451
Hi
It might be already a feature in the new IDE thats being cerated, but one of my bugbears with the IDE takes me to modules/code when its my code that has errored.
Obv if I misspell a file name in Image.Load, the code errors with a null in mojo2.graphics. While this is correct, its certainly not an error mojo2.graphics and might make people look in the wrong area.
It'd be nice if the debugger/ide ignored errors from code in modules/ and highlighted the previous file or last non modules file.. ie where I called DrawImage
Rich
 

Paul59

New member
CX Code Contributor
Joined
Dec 13, 2018
Messages
375
Yeah sort of agree but it does sometimes help you see what has caused the error; I've just got used to looking at the traceback to go to the relevant file (believe me, it's a frequent event so I'm well used to it now!! :D )
 

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
3,165
Interesting suggestion. Let's see if i can make this work.
 

dawlane

Well-known member
CX Code Contributor
Joined
Jun 21, 2017
Messages
852
It'd be nice if the debugger/ide ignored errors from code in modules/
Yeah, but I see a problem with that. You haven't though about if you make changes to a module. And it's not the IDE or debugger that is the issue. All code is transpiled, yours and the modules, it's how Monkey/Cerberus works. For the transpiler to ignore modules you would need a mechanism in place for it to ignore modules when required. As luck would have it, the reserved Module keyword could be of use here utilising a compiler switch; it's just a question of what was it's intended use.
 

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
3,165
I think every error should be printed in the console. But the ide should have a switch that states if it open the first line in the trace or the last.
Another option could be not to change the behaviour but let the ide open the corresponding line when you double click on it in the console. That would be better i think.
 

Rich

Well-known member
CX Code Contributor
3rd Party Module Dev
Tutorial Author
3rd Party Tool Dev
Joined
Sep 9, 2017
Messages
451
maybe it should be an option to turn o
I think every error should be printed in the console. But the ide should have a switch that states if it open the first line in the trace or the last.
Another option could be not to change the behaviour but let the ide open the corresponding line when you double click on it in the console. That would be better i think.
I like options. this means we can enable it when also playing with code in modules and modules_ext.
 
Top Bottom