02-03-2022, 09:10 PM
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.
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.
Then in script to set a breakpoint click menu Run -> Debug break. It inserts a code line that works like a breakpoint.
Example.
C# code:
// 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.