Debugging Scripts with Visual Studio - komefai/PS4Macro GitHub Wiki
-
Setup the project as mentioned in Scripting Basics.
-
In project properties, go to Debug tab and select
Start external programas your path toPS4Macro.exeinStart Action. -
Create
settings.xmlin the project's output folder (eg. MyScript/bin/Debug/) since PS4 Macro will now use the one next to your DLL instead of the default one next to the exe. Insettings.xml, set StartupFile to the script DLL for convenience.
<?xml version="1.0" encoding="utf-8"?>
<Settings>
<StartupFile>MyScript.dll</StartupFile>
<ShowConsole>true</ShowConsole>
</Settings>- Start the project as you would with an application project (pressing F5). Try adding a breakpoint and now it should be triggered.
- Use
Console.WriteLineto print to the built-in console - Use
System.Diagnostics.Debug.WriteLineto print to "Output" console in Visual Studio.