I have a very large script and it'd be really nice to know which function call is missing a parameter as per this message:
In general, it is kind of difficult to identify where errors are happening when you use include files. At least with my limited knowledge I have so far. Anything you can do to make that easier will be well appreciated!
Which function?
Moderators: Dorian (MJT support), JRL
Re: Which function?
I agree that the line number is almost useless when using includes (especially when using multiple includes).
I have different library files that I "include" as needed. When there is an error in line NNN, I'm not going to be able to find it when there are several includes at the top of my script. I'm hoping that someone has a method for determining the line number in this situation.
I have different library files that I "include" as needed. When there is an error in line NNN, I'm not going to be able to find it when there are several includes at the top of my script. I'm hoping that someone has a method for determining the line number in this situation.
- Marcus Tettmar
- Site Admin
- Posts: 7393
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Which function?
This is on the wish list.
However, unless you have lots of nested Includes you can just subtract the line number where the Include starts.
BUT - USE THE DEBUGGER
And if you set a break point just before the Include, step past that to see the Included file "sucked" in you can see what that line is. Should be easy enough to work out where the offending line is. Stop and open up the included script in another tab and set breakpoints around that area. Save and run again from the editor. You'll now be able to step through the area of concern.
However, unless you have lots of nested Includes you can just subtract the line number where the Include starts.
BUT - USE THE DEBUGGER
And if you set a break point just before the Include, step past that to see the Included file "sucked" in you can see what that line is. Should be easy enough to work out where the offending line is. Stop and open up the included script in another tab and set breakpoints around that area. Save and run again from the editor. You'll now be able to step through the area of concern.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: Which function?
Ah yes, the Debugger is once again the answer! Can't believe I didn't think of that. NICE!