Debugging PMDO: Difference between revisions

From PMDOWiki
IDK (talk | contribs)
Linux Debugging
IDK (talk | contribs)
mNo edit summary
Line 2: Line 2:


= Windows Setup =
= Windows Setup =
# Download [https://dotnet.microsoft.com/en-us/download/dotnet/8.0 .NET 8.0]. You want to download the x64 version  Confirm that it is installed using the command <code>dotnet --list-runtimes</code>.  
# Download [https://dotnet.microsoft.com/en-us/download/dotnet/8.0 .NET 8.0]. You want to download the x64 version. Confirm that it is installed using the command <code>dotnet --list-runtimes</code>.  
# Recursively clone the PMDO repository using <code>git clone --recurse-submodules -j8 https://github.com/audinowho/PMDODump.git</code>.
# Recursively clone the PMDO repository using <code>git clone --recurse-submodules -j8 https://github.com/audinowho/PMDODump.git</code>.
# Open PMDOData.sln using [https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&channel=Release&version=VS2022&source=VSLandingPage&cid=2030&passive=false Visual Studio 2022] or later.
# Open PMDOData.sln using [https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&channel=Release&version=VS2022&source=VSLandingPage&cid=2030&passive=false Visual Studio 2022] or later.
Line 10: Line 10:
= Linux Setup =
= Linux Setup =


# Download [https://dotnet.microsoft.com/en-us/download/dotnet/8.0 .NET 8.0]. You want to download the x64 version  Confirm that it is installed using the command <code>dotnet --list-runtimes</code>.  
# Download [https://dotnet.microsoft.com/en-us/download/dotnet/8.0 .NET 8.0]. You want to download the x64 version. Confirm that it is installed using the command <code>dotnet --list-runtimes</code>.  
# Recursively clone the PMDO repository using <code>git clone --recurse-submodules -j8 https://github.com/audinowho/PMDODump.git</code>.
# Recursively clone the PMDO repository using <code>git clone --recurse-submodules -j8 https://github.com/audinowho/PMDODump.git</code>.
# Open PMDOData.sln using [https://code.visualstudio.com/download Visual Studio Code].  You can do this by opening the PMDODump folder, then right clicking PMDOData.sln and choosing "Open Solution".
# Open PMDOData.sln using [https://code.visualstudio.com/download Visual Studio Code].  You can do this by opening the PMDODump folder, then right clicking PMDOData.sln and choosing "Open Solution".
Line 26: Line 26:
Made by: Trio-#4442
Made by: Trio-#4442


# Download [https://dotnet.microsoft.com/en-us/download/dotnet/8.0 .NET 8.0]. You want to download the x64 version  Confirm that it is installed using the command <code>dotnet --list-runtimes</code>.  
# Download [https://dotnet.microsoft.com/en-us/download/dotnet/8.0 .NET 8.0]. You want to download the x64 version. Confirm that it is installed using the command <code>dotnet --list-runtimes</code>.  
# Recursively clone the PMDO repository using <code>git clone --recurse-submodules -j8 https://github.com/audinowho/PMDODump.git</code>.
# Recursively clone the PMDO repository using <code>git clone --recurse-submodules -j8 https://github.com/audinowho/PMDODump.git</code>.
# Copy all of the <code>.dylib</code> files in  <code>PMDC/PMDC/runtimes</code> folders to <code>PMDC/PMDC</code>. Here’s what your file structure should look like: [[File:Debug_Mac_FolderStructure.png|frameless]]
# Copy all of the <code>.dylib</code> files in  <code>PMDC/PMDC/runtimes</code> folders to <code>PMDC/PMDC</code>. Here’s what your file structure should look like: [[File:Debug_Mac_FolderStructure.png|frameless]]

Revision as of 05:10, 9 November 2024

See also: Contributing Code, Building PMDO

Windows Setup

  1. Download .NET 8.0. You want to download the x64 version. Confirm that it is installed using the command dotnet --list-runtimes.
  2. Recursively clone the PMDO repository using git clone --recurse-submodules -j8 https://github.com/audinowho/PMDODump.git.
  3. Open PMDOData.sln using Visual Studio 2022 or later.
  4. Set your configuration to Debug, Any CPU. Build the entire solution
  5. Set PMDC as the startup project and hit Debug.

Linux Setup

  1. Download .NET 8.0. You want to download the x64 version. Confirm that it is installed using the command dotnet --list-runtimes.
  2. Recursively clone the PMDO repository using git clone --recurse-submodules -j8 https://github.com/audinowho/PMDODump.git.
  3. Open PMDOData.sln using Visual Studio Code. You can do this by opening the PMDODump folder, then right clicking PMDOData.sln and choosing "Open Solution".
  4. Install the C# Dev Kit if you haven't already. This can be found in the Extensions tab.
  5. After the C# Dev Kit is installed, you can open the Command Palette Ctrl+Shift+P and typing/choosing Debug: Select and Start Debugging.
    1. Choose C#.
      1. If you've properly opened the PMDOData.sln solution, you should have several Launch Configurations available. Choose "C#: PMDC".
  6. Debug will start. If the console complains about not being able to find the correct file from path, you may need to change the relative paths specified for the -asset argument in the PMDC/PMDC/Properties/launchSettings.json file.
  7. Once this debug configuration is chosen, you can start debugging quickly by going to the Debug tab and selecting the green button next to "Run and Debug".

Mac Setup

Note: This has only been tested with Jetbrains Rider and Visual Studio Code

Made by: Trio-#4442

  1. Download .NET 8.0. You want to download the x64 version. Confirm that it is installed using the command dotnet --list-runtimes.
  2. Recursively clone the PMDO repository using git clone --recurse-submodules -j8 https://github.com/audinowho/PMDODump.git.
  3. Copy all of the .dylib files in PMDC/PMDC/runtimes folders to PMDC/PMDC. Here’s what your file structure should look like:
  4. In your ~/.gitignore_global file, add the following files for git to ignore:
# Debug logs (npm, yarn)
*.log

# Editor artifacts
.*.sw[a-z]
*~
.#*
.vscode
.idea

# OS files
Thumbs.db
.DS_Store

You may want to include more. Modified from here.

The following steps below depend on your IDE of choice. See each section below.

Jetbrains Rider

Jetbrains Rider requires a paid subscription.

  1. Debug should run out of the box. Set the configuration to PMDC and click "Debug", and you should be all ready to go!

Visual Studio Code

  1. Install the C# extension. There is a possibility that you have to downgrade to an older version like v1.24.4 or modify the settings in Omnisharp settings discussed here? But I personally wasn’t able to figure out how to make it work.
  2. Create .vscode/launch.json in the root folder of PMDODump In launch.json, copy everything from here to the file.
  3. In the Run and Debug tab in VSCode, you can click on the green arrow to begin debugging.