Support for IDE-like debugging of RGSS / ruby scripts #198
Labels
No Label
RGSS accuracy
bug
compilation
discussion
documentation
duplicate
enhancement
invalid
performance issue
port request
question
ruby incompatibility
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: MapleShrine/mkxp#198
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The idea is that it would be much easier to debug scripts, with step through/step into...etc functions provided by the IDE.
I saw some people mentioning using IDEs instead of the engine editor with MV, which shouldn't be too difficult because MV is backed by Javascript.
For engines with RGSS, I am under the impression that this would require quite some hacking, correct? (Likely involves RubyInline/Rice/FFI)
This is because both the official and the mkxp binary are exe first, Ruby second (Binary runtime that calls into Ruby script), where as MV is Javascript first. (Javascript that calls into JS Runtime)
Appreciate clarifications or confirmations.
Last time I checked (a long time ago), there was no simple way to step through a running ruby script, look at (local) variables etc., has this changed meanwhile?
I don't like the idea of people using mkxp to create new games (because the engine architecture of RPG Maker is flawed, see #103), but I would still appreciate an effort like this, simply for the fact that it's a nightmare to debug existing games right now with the current infrastructure (which is barely more than printf-debugging).
This is correct. I don't know what's involved in making MRI "traceable", and I don't really have time or resources to devote to this, but I would support such an effort.
Oh, I see..
Hmm, RubyMine seems to be able to? I'm approaching this from a similar perspective where ActionScript under Flash has no breakpoint at all, but with Flex you get those things...But in fact, I am not familiar with Ruby development at all, sorry if this turned out to be a silly question.
Can't agree more.
Thanks for the answer. I don't think I can do it even if I have all the time I want. One can only dream...
Well...I don't know why I missed them, but there were certainly some attempts at porting the engine that can be used for the purpose. None seem to be finished.
I have managed a frankenstein that can be boot up and debugged from VSCode (breakpoints/step into/step over/inspect variables...etc), it can show the title screen (in a quite poor way, because it is spliced together), but that's about it...
VXonGosu.zip
I have no idea what is happening beyond title screen, either in a infinite loop or takes too much time drawing. Monkey patching can only get one so far...
ruby2.6 + ruby_jard
use rubygems install ruby_jard
:O 超かっこいいじゃないすか、まるでIDEのdebuggerみたいです。 スクショ ありがとうございます。
You can actually get rdebug_ide and debase working inside mkxp, with some trickery. It's kinda meh, but it works.
Ruby does come bundled with an official debugger too, so you could try to upgrade to 3.1.0 and use that instead.
Currently, mkxp doesn't work on ruby 3.1, but I'm investigating.
https://aur.archlinux.org/packages/mkxp-git/
Again, it's 2.7, and since ruby_jard>2.5 or higher, I've adopted the stable 2.6.
You can try using binding-util.h from mkxp-z, it supports 3.1