One of the frustrating things I am finding in using Maple debugger is that I can't set breakpoint using stopat() at some line number in some inner module, if the inner module is local module. It has to be an exported module.
Here is an example
local foo1; #inner module. But if local, Can't set breakpoint from outside
foo2:=proc() #or breakpoint in first line here
s:=1; #suppose I want to set break point here
foo1:-main_entry(); #call inner module's proc
Since there is inner module, local to outside module, I can't set break into the inner module procs anywhere.
Error, module does not export `foo1`
A workaround for now is to change "local" to "export" on the inner modules declarations I want to debug, so I can setbreak points inside them, then when done, make them local again. So changed "local foo1" to "export foo1" above, and now
This was also a little strange to me, since foo2() is a LOCAL proc to module foo1, yet Maple did not complain like it did when module foo1 was a LOCAL module to foo. I would have expected Maple to complain again for same reason.
So I am using the above workaround for now. But it is just a little annoying becuase I have to keep changing module from LOCAL to EXPORT in order to set breakpoints, then remember to make them local again.
Is there a better workaround?
A product suggestion: make stopat() ignore the local module setting and treat it as export for the purpose of setting a break point. This way one does not have to change the code just to set a breakpoint. Or if not to change current behavior, add a new option, as in
stopat(........, option= ignore_local_setting)
So the default remain the same as now, but with the new option, it will set breakpoint anywhere, even in local modules.