Debugger Ren'py with PowerShell for Visual Studio Code
A downloadable tool
This template includes VSCode launchs for developing Ren'Py projects.
Git Repo: DRincs-Productions/debugger-renpy
What can be done:
- Add
$ print("...")
to display them in the vscode terminal while the app is running - Don't have to open Ren'py SDK every time
- Close the game with CTRL+C in the terminal or when closing VSCode
What cannot be done:
- Insert breakpoint
- Install PowerShell on Windows, Linux, and macOS
- Install PowerShell Extension for VS Code
- Download Ren'Py SDK and extract into a folder
- Add files into your project
As shown in the image there are several launches that are added
In any case, if you have never used VS Code Debugging I recommend you read first: Debugging
( Necessary only in the beginning )
It will create the .renpy-sdk file in which the path to your Ren'Py SDK folder is written.
After you launch it, paste the path to your Ren'Py SDK folder Exemple: /home/username/renpy
Select:
- Run or
- Force Recompile & Run
And Play!
A strange error screen opens (tiny file dialogs)
This happens when renpy tries to open the error file and the operating system does not have a program capable of opening a txt from the terminal.
The solution is to install a program to open these files. For example yad
sudo apt-get install -y yad
After an error CTRL+C doesn't work
This happens in case the error log is opened for editing with VIM.
In this case you must write the following sequence of characters to close the file: :q
Almost certainly when you start debugging for the first time, it will give you an error because some files do not have "authorization" to be executed.
To fix this you need to run the following commands in the Renpy SDK folder
chmod +x renpy.sh chmod +x renpy.py chmod +x renpy.exe chmod +x lib/py3-linux-x86_64/renpy chmod +x lib/py3-linux-x86_64/pythonw sudo apt-get install -y xdg-utils
Installing PowerShell on Ubuntu
https://learn.microsoft.com/en-us/powershell/scripting/install/install-ubuntu?view=powershell-7.3
# Update the list of packages sudo apt-get update # Install pre-requisite packages. sudo apt-get install -y wget apt-transport-https software-properties-common # Download the Microsoft repository GPG keys wget -q "https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb" # Register the Microsoft repository GPG keys sudo dpkg -i packages-microsoft-prod.deb # Update the list of packages after we added packages.microsoft.com sudo apt-get update # Install PowerShell sudo apt-get install -y powershell
You can also debug on WSL.
But there might be some problems while opening the GUI of WSL. It depends on the compatibility with your graphics card. Read: https://docs.microsoft.com/it-it/windows/wsl/tutorials/gui-apps
bin/renpy.ps1
: Script for calling Ren'Py SDKbin/set-origin.sh
: Git setup helper to configure your local folder to sync to a remote host.vscode/launch.json
: Launch for launching Ren'Py SDK commands without opening the Ren'Py launcher.- Setup (custom file for remembering your project's SDK path for commands to work)
- Run
- Force Recompile & Run
- Delete Persistent
- Lint
- Distribute
Status | Released |
Category | Tool |
Author | DRincs Productions |
Genre | Visual Novel |
Made with | Ren'Py |
Tags | Ren'Py, vs-code |
Comments
Log in with itch.io to leave a comment.
Hi DRincs,
Thanks for this wonderful tool! I'll using it in my projects moving forward.
There was an error when running my ren'py game the first time, probably due to being on Windows (not WSL) and the version of python I'm using which is 3.12.x.