MZ - Launching and debugging in Ubuntu/WebStorm

● ARCHIVED · READ-ONLY
Started by birdbert 2 posts View original ↗
  1. It took me a while to get my head around running RMMZ in Ubuntu and debugging plugins. Perhaps because it isn't officially supported! Hopefully this will help anyone who tries something similar:

    Running RMMZ itself:

    1. Install PlayOnLinux
    2. In PlayOnLinux, hit the Install button and select the RMMZ installer
    3. Complete the wizard
    4. Create a shortcut
    You should now be able to launch RMMZ like any other application. It will appear in a Wine window. You can create, edit and save games. However, you will not be able to launch them.

    To launch and debug we will first configure the WebStorm IDE:
    1. Install WebStorm (you can get it from the Snap Store)
    2. Install NW.js (previously known as node-webkit):
      • Download the 64-bit SDK from https://nwjs.io/downloads/
      • Unzip it to ~/.local/nwjs-sdk-v0.55.0-linux-x64
      • Created a symlink from /home/user/.local/bin to ~/.local/nwjs-sdk-v0.55.0-linux-x64/nw
    3. Open your RMMZ project folder in WebStorm
    4. Create an "NW.js" configuration as follows:
      • NW.js app: project folder (it contains package.json)
      • NW.js arguments: None
      • Working directory: project folder
      • Environment variables: None
      • NW.js interpreter: ~/.local/bin/nw
    5. Also create an "Attach to Node.js/Chrome" configuration as follows:
      • Host: localhost
      • Port: 34313 (it doesn't actually matter)
      • Attach to: "Chrome or Node.js... started with --inspect"
      • Reconnect automatically: True
    To launch and debug the RMMZ project:
    1. Launch the NW.js configuration in Debug mode
    2. Wait for this message to appear in the console:
      • DevTools listening on ws://127.0.0.1:54321/devtools/browser/527f34ec-746d-4e3f-8f3e-6c2287d157d1
    3. Click on the ws:// link to start the "Attach" config
    4. You will be offered a dropdown of HTML files to attach to, pick "index.html"
    5. Go back to the NW.js tab
    6. Click "Reload in Browser"
    The project will now be reloaded, and you will hit any load-time breakpoints that you have set.

    References
  2. Thanks for sharing this, it is always good to have extra options available! I found it alot simpler to debug the project using VScode, there is a thread about it on the forum somwhere.

    Also I should add, if running RMMZ through steam (and proton) then the editor AND playtesting work normally.. but I still hope for a native version someday.