Posts: 45
Threads: 22
Joined: Mar 2021
I recall reading that if I want to step-debug and stack trace, I'll need to set up VS. I use VS for other projects, so that's not a big deal. I assume I'll need to probably download the entire source code to Au so that I can set stop points? Or is creating a project with my scripts sufficient? It's not such a huge deal, as I have been using the "print.it()" method of debugging so far....
Posts: 12,095
Threads: 142
Joined: Dec 2002
Only need VS installed.
Then in script to set a breakpoint click menu Run -> Debug break. It inserts a code line that works like a breakpoint.
Example.
// script ""
print.it(1);
if(Debugger.IsAttached) Debugger.Break(); else Debugger.Launch();
print.it(2);
print.it(3);
When the script runs and encounters this code, a dialog will ask whether you want to debug, and you say Yes and select a running or new VS instance. Now you are in VS. At first it may say "source not found", but after several Step Over button clicks it will open the script and step into it.
Posts: 45
Threads: 22
Joined: Mar 2021