Which function?

Ideas for new features & functions

Moderators: Dorian (MJT support), JRL

Post Reply
NancyM
Pro Scripter
Posts: 66
Joined: Mon Jul 18, 2016 7:01 pm

Which function?

Post by NancyM » Mon Sep 12, 2016 4:03 pm

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!

dtaylor
Junior Coder
Posts: 47
Joined: Mon Aug 08, 2016 2:42 am

Re: Which function?

Post by dtaylor » Sun Sep 18, 2016 8:04 am

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.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Which function?

Post by Marcus Tettmar » Mon Sep 19, 2016 8:06 am

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.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

dtaylor
Junior Coder
Posts: 47
Joined: Mon Aug 08, 2016 2:42 am

Re: Which function?

Post by dtaylor » Mon Sep 19, 2016 7:53 pm

Ah yes, the Debugger is once again the answer! Can't believe I didn't think of that. NICE!

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts