07-10-2014 06:29 AM
07-10-2014 05:51 PM
Leo
I also use scriptincludes extensively, Most of mine are in the range of 500 to 2000 lines. Usually I organize them in logical code topics, I like to use them to hold one class most of the time. When I debug these I can set a breakpoint, and it will stop at that location.
I also use custom log class as well, I find this quite helpful, in the applications that are unattended.
The only thing I can think of to try is to separate the 7k file into 2 2k line files and then script include them separately.
Paul
ps. I sometimes need to have intellisense work from a file that was scriptincluded, this requires copying the file into the end of the main script. (you most likely already know this 🙂 )
One other note, Are you talking about debuging code in a SUD, that is whole different problem to deal with.
07-15-2014 01:16 PM
I have the same problem. Even putting a breakpoint in the included script doesn't work for me. I have the added benefit of Diadem causing an access violation error in the ntdll process if I stop the debugger while it's in the included script.
07-15-2014 01:24 PM
Actually, it seems related to code folding. In my VBS library, code folding will work with Function or function. BUT, if I create a new blank library, code folding only works with function and not Function... if i use Function to create some dummy functions, this debugging problem does not occur. Hope that helps NI find the problem....
07-15-2014 01:54 PM - edited 07-15-2014 01:59 PM
I may have found a work around. It's worked a few times for me. Go to file->Change coding, then select unicode to ansi. Like I said, my debugging works as expected now. Try it, let the group know. This should go without saying, but backup your library first, this command overwrites it.
EDIT: Never mind. It workd for about 4 or 5 times, but now it's back to highlighting the last line..
07-23-2014 02:57 AM
First of all, thank you Pesmith8 and RussellSenior for your replies.
Unfortunately, I do not have the option of splitting the function library into multiple files, since I am not the owner, just a contributor.
However, I seem to have found a way to mitigate the problem:
Set a break point at the line where you call a function in the included script. Then, step into (F8) the called function, which should transport you to the corresponding line in the included script file. After that, you can set further break points in the included script so you don't have to slog through a lengthy function tail or such.
I will keep testing this, but it seems to be a functional workaround. Hopefully, this helps others, as well.
07-23-2014 03:36 AM - edited 07-23-2014 03:48 AM
Update: It seems to only work if no unsaved changes are present in any script file involved.
EDIT: It seems that the script file you jump into needs to be at the end of the queue of open files.
EDIT2: Nothing I have tried seems to have a lasting effect. Very annoying.
08-01-2014 11:06 AM
Hi Leo et al.,
Would one of you please take the time to submit a code example that NI could use to reproduce and debug this behavior? It could be your full 7k lines of code or some subset or something entirely different, but we need to be able to explore this issue on R&D computers in order to fix it and/or find lasting workarounds.
Brad Turpin
DIAdem Product Support Engineer
National Instruments