Skip to content

Debugging Scripts with Visual Studio

Komefai edited this page Oct 6, 2017 · 5 revisions

How to debug your script with PS4 Macro

  1. Setup the project as mentioned in Scripting Basics.

  2. In project properties, go to Debug tab and select Start external program as your path to PS4Macro.exe in Start Action.

  3. Create settings.xml in 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.

<?xml version="1.0" encoding="utf-8"?>
<Settings>
  <StartupFile>MyScript.dll</StartupFile>
</Settings>
  1. Start the project as you would with an application project (pressing F5). Try adding a breakpoint and now it should be triggered.

NOTES

  • Instead of using Console.WriteLine to print a text to output console, use System.Diagnostics.Debug.WriteLine to be able to see the output.